Skip to content

Commit 28b6e65

Browse files
committed
remove 42header
1 parent 7bea458 commit 28b6e65

File tree

5 files changed

+29
-48
lines changed

5 files changed

+29
-48
lines changed

module/f.ft_puts.test/ft_puts.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
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-
131
#include "ft.h"
142

153
#include <stdio.h>

module/f.hello_world/hello_world.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
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-
131
#include "hello.h"
142

153
#include "ft.h"

module/h.ft/ft.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
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-
131
#ifndef FT_H
142
# define FT_H
153

module/h.hello/hello.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
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-
131
#ifndef HELLO_H
142
# define HELLO_H
153

script/norminette.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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

0 commit comments

Comments
 (0)