File tree Expand file tree Collapse file tree 5 files changed +29
-48
lines changed Expand file tree Collapse file tree 5 files changed +29
-48
lines changed Original file line number Diff line number Diff line change 1
- /* ************************************************************************** */
2
- /* */
3
- /* ::: :::::::: */
4
- /* fake_file_name (file name is useless too) :+: :+: :+: */
5
- /* +:+ +:+ +:+ */
6
- /* By: 42header-remover <whatever@example.com> +#+ +:+ +#+ */
7
- /* +#+#+#+#+#+ +#+ */
8
- /* Created: 1970/01/01 00:00:00 by VCS handles #+# #+# */
9
- /* Updated: 1970/01/01 00:00:00 by file history ### ########.fr */
10
- /* */
11
- /* ************************************************************************** */
12
-
13
1
#include "ft.h"
14
2
15
3
#include <stdio.h>
Original file line number Diff line number Diff line change 1
- /* ************************************************************************** */
2
- /* */
3
- /* ::: :::::::: */
4
- /* fake_file_name (file name is useless too) :+: :+: :+: */
5
- /* +:+ +:+ +:+ */
6
- /* By: 42header-remover <whatever@example.com> +#+ +:+ +#+ */
7
- /* +#+#+#+#+#+ +#+ */
8
- /* Created: 1970/01/01 00:00:00 by VCS handles #+# #+# */
9
- /* Updated: 1970/01/01 00:00:00 by file history ### ########.fr */
10
- /* */
11
- /* ************************************************************************** */
12
-
13
1
#include "hello.h"
14
2
15
3
#include "ft.h"
Original file line number Diff line number Diff line change 1
- /* ************************************************************************** */
2
- /* */
3
- /* ::: :::::::: */
4
- /* fake_file_name (file name is useless too) :+: :+: :+: */
5
- /* +:+ +:+ +:+ */
6
- /* By: 42header-remover <whatever@example.com> +#+ +:+ +#+ */
7
- /* +#+#+#+#+#+ +#+ */
8
- /* Created: 1970/01/01 00:00:00 by VCS handles #+# #+# */
9
- /* Updated: 1970/01/01 00:00:00 by file history ### ########.fr */
10
- /* */
11
- /* ************************************************************************** */
12
-
13
1
#ifndef FT_H
14
2
# define FT_H
15
3
Original file line number Diff line number Diff line change 1
- /* ************************************************************************** */
2
- /* */
3
- /* ::: :::::::: */
4
- /* fake_file_name (file name is useless too) :+: :+: :+: */
5
- /* +:+ +:+ +:+ */
6
- /* By: 42header-remover <whatever@example.com> +#+ +:+ +#+ */
7
- /* +#+#+#+#+#+ +#+ */
8
- /* Created: 1970/01/01 00:00:00 by VCS handles #+# #+# */
9
- /* Updated: 1970/01/01 00:00:00 by file history ### ########.fr */
10
- /* */
11
- /* ************************************************************************** */
12
-
13
1
#ifndef HELLO_H
14
2
# define HELLO_H
15
3
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ for f in " $@ "
4
+ do
5
+ is_first_line=1
6
+ has_error=0
7
+ find " $f " -type f \( -name " *.c" -o -name " *.h" \) | while read -r file; do
8
+ OUTPUT=" $(
9
+ ${NORMINETTE-norminette} " $file " | while read -r line; do
10
+ if [ $is_first_line -eq 1 ]; then
11
+ is_first_line=0
12
+ continue
13
+ fi
14
+ line=$( echo " $line " | sed " s/^Error: INVALID_HEADER[[:space:]]\\ {1,\\ }(.*\$ //" )
15
+ if [ " $line " != " " ]; then
16
+ if [ $has_error -eq 0 ]; then
17
+ echo " $file : Error!"
18
+ fi
19
+ has_error=1
20
+ echo " $line "
21
+ fi
22
+ done
23
+ ) "
24
+ if [ " $OUTPUT " != " " ]; then
25
+ echo " $OUTPUT "
26
+ exit 1
27
+ fi
28
+ done
29
+ done
You can’t perform that action at this time.
0 commit comments