From 937d0be76219cb2d382f360c32bc970c859da065 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Thu, 28 May 2020 20:40:53 +0200 Subject: Meta: Add a script check the presence of "#pragma once" in header files .. and make travis run it. I renamed check-license-headers.sh to check-style.sh and expanded it so that it now also checks for the presence of "#pragma once" in .h files. It also checks the presence of a (single) blank line above and below the "#pragma once" line. I also added "#pragma once" to all the files that need it: even the ones we are not check. I also added/removed blank lines in order to make the script not fail. I also ran clang-format on the files I modified. --- Libraries/LibCore/Forward.h | 2 ++ Libraries/LibCore/Gzip.h | 2 ++ Libraries/LibCore/puff.h | 2 ++ 3 files changed, 6 insertions(+) (limited to 'Libraries/LibCore') diff --git a/Libraries/LibCore/Forward.h b/Libraries/LibCore/Forward.h index 8725e91d5c..56b99b8c85 100644 --- a/Libraries/LibCore/Forward.h +++ b/Libraries/LibCore/Forward.h @@ -24,6 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#pragma once + namespace Core { class ArgsParser; diff --git a/Libraries/LibCore/Gzip.h b/Libraries/LibCore/Gzip.h index 54232ef6b7..a96af59536 100644 --- a/Libraries/LibCore/Gzip.h +++ b/Libraries/LibCore/Gzip.h @@ -24,6 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#pragma once + #include #include #include diff --git a/Libraries/LibCore/puff.h b/Libraries/LibCore/puff.h index f778ea319a..5943910403 100644 --- a/Libraries/LibCore/puff.h +++ b/Libraries/LibCore/puff.h @@ -1,3 +1,5 @@ +#pragma once + /* puff.h Copyright (C) 2002-2013 Mark Adler, all rights reserved version 2.3, 21 Jan 2013 -- cgit v1.2.3