]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
gitlabci: fix lint:pedantic
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 21 Feb 2019 10:36:04 +0000 (11:36 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:35 +0000 (10:43 +0100)
.gitlab-ci.yml
doc/build.rst
meson.build

index 16f7124bf586e4048b3426cbe1520dd796f1b4e3..e69bc359211bccd309c1ecce663d4e254e8fdc8f 100644 (file)
@@ -132,21 +132,18 @@ kres-gen:
     - docker
 
 lint:pedantic:
-  stage: test  # could be in build already, but let's not block the test stage if this fails
-  dependencies: []  # do not download build artifacts
-  except:
-    - master
-  variables:
-    CFLAGS: -Werror -Wall -Wpedantic -ggdb -std=gnu11
-  script:
-    - make -k all
-    - make clean
-    - make -k all CC=clang CXX=clang++ \
-        CFLAGS="$CFLAGS -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant"
+  <<: *test_nodep
   tags:
     - docker
     - linux
     - amd64
+  script:
+    - meson build_pedantic_gcc -Dwerror=true -Dc_args='-Wpedantic'
+    - ninja -C build_pedantic_gcc
+    - >
+      CC=clang CXX=clang++ meson build_pedantic_clang -Dwerror=true -Dc_args='
+      -Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant'
+    - ninja -C build_pedantic_clang
 
 lint:lua:
   stage: test
index 59ffdf599fef5a3535c37fcba6f4fc1a4700dfaa..359b4973de7afd95c70412b3dd150dbb3a1e7a2e 100644 (file)
@@ -4,7 +4,7 @@ Building from sources
 .. note:: Latest up-to-date packages for various distribution can be obtained
    from `<https://knot-resolver.cz/download/>`_
 
-Knot-resolver is written for UNIX-like systems, mainly in C99.
+Knot-resolver is written for UNIX-like systems using modern C standards.
 Portable I/O is provided by libuv_.
 Some 64-bit systems with LuaJIT 2.1 may be affected by
 `a problem <https://github.com/LuaJIT/LuaJIT/blob/v2.1/doc/status.html#L100>`_
@@ -64,7 +64,7 @@ tests.
 
 .. [#] If ``meson >= 0.47`` isn't available for your distro, check backports
    repository oor use python pip to install it.
-.. [#] Requires C99, ``__attribute__((cleanup))`` and ``-MMD -MP`` for
+.. [#] Requires ``__attribute__((cleanup))`` and ``-MMD -MP`` for
    dependency file generation. GCC, Clang and ICC are supported.
 .. [#] You can use variables ``<dependency>_CFLAGS`` and ``<dependency>_LIBS``
    to configure dependencies manually (i.e. ``libknot_CFLAGS`` and
index 20994fbed41f39734068cb62b817cb65f08e4ac3..a7bfec9174a405ac3340bb036d58c4200813998e 100644 (file)
@@ -3,7 +3,7 @@ project(
   ['c', 'cpp'],
   license: 'GPLv3+',
   version: '3.2.1',
-  default_options: ['c_std=c99', 'b_ndebug=if-release'],
+  default_options: ['c_std=gnu11', 'b_ndebug=if-release'],
   meson_version: '>=0.47.0',
 )