File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -595,8 +595,10 @@ ENDFILE{
595
595
# DOC: macros are exempted from this rule.
596
596
error(" non_existing_cpp" ," file " file " is a header but there is no corresponding source" );
597
597
}
598
- while ((getline < cppfile)>= 0 ){
598
+ noIncludes= 1 ;
599
+ while ((getline < cppfile)> 0 ){
599
600
if (match ($0 ," ^# *include" )){
601
+ noIncludes= 0 ;
600
602
sub (" ^# *include" ," " );
601
603
# DOC: :non_included_h:
602
604
# DOC: The source file corresponding to a header file (that is: with the same name) should include it as the first included file.
@@ -605,6 +607,7 @@ ENDFILE{
605
607
break ;
606
608
}
607
609
}
610
+ if (noIncludes== 1 ) error(" non_included_h" ," file " file " is a header but " cppfile " does not include it" );
608
611
close (cppfile)
609
612
}
610
613
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ # in this directory, only accept source, Makefile and README
3
+ ! /.gitignore
4
+ ! /* .c
5
+ ! /* .cpp
6
+ ! /* .h
7
+ ! /Makefile
8
+ ! /README
9
+ ! /module.type
You can’t perform that action at this time.
0 commit comments