From 077994c12a8ac31bc9d910741b64d2bb444b2655 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 26 Apr 2014 16:10:50 -0700 Subject: Stricter grep checks --- Makefile.in | 4 ++++ src/generic/intern-pool_test.cpp | 2 +- src/io/line.cpp | 2 +- src/io/lock.cpp | 2 +- src/map/magic-interpreter.cpp | 2 +- src/mmo/dumb_ptr.hpp | 2 +- src/mmo/human_time_diff_test.cpp | 2 +- src/range/slice.tcc | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index c19fc1c..e2e3bca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -459,17 +459,21 @@ obj/%.cpp.formatted: src/%.cpp tools/indenter $(MKDIR_FIRST) apply-filter 'indenter -cpp' $< fgrep -q Copyright $< + fgrep -q $(notdir $<) $< fgrep -q ../poison.hpp $< touch $@ obj/%.hpp.formatted: src/%.hpp tools/indenter $(MKDIR_FIRST) apply-filter 'indenter -cpp' $< fgrep -q Copyright $< + fgrep -q $(notdir $<) $< if [[ $< == *fwd* ]]; then fgrep -q ../sanity.hpp $<; else fgrep -q '"fwd.hpp"' $<; fi + if [[ $< == *fwd* ]]; then ! fgrep -q '"fwd.hpp"' $<; else ! fgrep -q ../sanity.hpp $<; fi touch $@ obj/%.tcc.formatted: src/%.tcc tools/indenter $(MKDIR_FIRST) apply-filter 'indenter -cpp' $< fgrep -q Copyright $< + fgrep -q $(notdir $<) $< touch $@ .PHONY: format format-cpp format-hpp diff --git a/src/generic/intern-pool_test.cpp b/src/generic/intern-pool_test.cpp index f53e31d..bef001f 100644 --- a/src/generic/intern-pool_test.cpp +++ b/src/generic/intern-pool_test.cpp @@ -1,5 +1,5 @@ #include "intern-pool.hpp" -// intern-pool.hpp - Testsuite for cached integer/string lookups. +// intern-pool_test.cpp - Testsuite for cached integer/string lookups. // // Copyright © 2013 Ben Longbons // diff --git a/src/io/line.cpp b/src/io/line.cpp index adefe53..4df29c8 100644 --- a/src/io/line.cpp +++ b/src/io/line.cpp @@ -1,5 +1,5 @@ #include "line.hpp" -// io/line.hpp - Input from files, line-by-line +// io/line.cpp - Input from files, line-by-line // // Copyright © 2014 Ben Longbons // diff --git a/src/io/lock.cpp b/src/io/lock.cpp index f6bbb01..e06c2f1 100644 --- a/src/io/lock.cpp +++ b/src/io/lock.cpp @@ -1,5 +1,5 @@ #include "lock.hpp" -// io/lock.hpp - Output to files with atomic replacement and backups. +// io/lock.cpp - Output to files with atomic replacement and backups. // // Copyright © 2013 Ben Longbons // diff --git a/src/map/magic-interpreter.cpp b/src/map/magic-interpreter.cpp index 4680971..cca5500 100644 --- a/src/map/magic-interpreter.cpp +++ b/src/map/magic-interpreter.cpp @@ -1,5 +1,5 @@ #include "magic-interpreter.hpp" -// magic-interpreter.hpp - Old magic. +// magic-interpreter.cpp - Old magic. // // Copyright © 2014 Ben Longbons // diff --git a/src/mmo/dumb_ptr.hpp b/src/mmo/dumb_ptr.hpp index 6501b74..3472d8b 100644 --- a/src/mmo/dumb_ptr.hpp +++ b/src/mmo/dumb_ptr.hpp @@ -1,6 +1,6 @@ #ifndef TMWA_MMO_DUMB_PTR_HPP #define TMWA_MMO_DUMB_PTR_HPP -// ptr.hpp - temporary new/delete wrappers +// dumb_ptr.hpp - temporary new/delete wrappers // // Copyright © 2013 Ben Longbons // diff --git a/src/mmo/human_time_diff_test.cpp b/src/mmo/human_time_diff_test.cpp index fb9522e..d036537 100644 --- a/src/mmo/human_time_diff_test.cpp +++ b/src/mmo/human_time_diff_test.cpp @@ -1,5 +1,5 @@ #include "human_time_diff.hpp" -// human_time_diff.hpp - Testwuite for broken deltas +// human_time_diff_test.cpp - Testwuite for broken deltas // // Copyright © 2013 Ben Longbons // diff --git a/src/range/slice.tcc b/src/range/slice.tcc index f3406ee..45dac50 100644 --- a/src/range/slice.tcc +++ b/src/range/slice.tcc @@ -1,4 +1,4 @@ -// strings/base.tcc - Inline functions for strings/base.hpp +// ranges/slice.tcc - Inline functions for strings/base.hpp // // Copyright © 2013 Ben Longbons // -- cgit v1.2.3-60-g2f50