-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More analyzers (cppcheck, clang-tidy, iwyu) #2078
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
81d1c98
[Jenkins] Check includes with include-what-you-use
bilke 9834824
[Jenkins] Run clang-tidy cppcheck and CMake link check in Analyzer job.
bilke 082019e
[BL] Initialization fix.
bilke ce6fa02
[GL] Possible memleak fix.
bilke 79ca32e
[CMake] Use LIS from Conan.
bilke 6f1a9d4
[Jenkins] Include mappings file for iwyu for logog include.
bilke bb00d58
[clang-tidy] Explained hack a bit.
bilke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
Checks: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
# Disable all checks, one check has to be enabled (hack) | ||
Checks: '-*,boost-use-to-string' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y software-properties-common curl \ | ||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \ | ||
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ | ||
&& apt-get update \ | ||
&& apt-get -y install \ | ||
build-essential \ | ||
ccache \ | ||
clang-3.9 \ | ||
git git-lfs \ | ||
python-pip \ | ||
sudo \ | ||
unzip \ | ||
xz-utils | ||
|
||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install cmake conan>=1.0.0 | ||
|
||
# Ninja | ||
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \ | ||
&& unzip ninja-linux.zip \ | ||
&& mv ninja /usr/local/bin/ninja \ | ||
&& rm ninja-linux.zip | ||
|
||
ENV CC=clang-3.9 | ||
ENV CXX=clang++-3.9 | ||
|
||
# Lis | ||
RUN curl -L -o lis.tar.gz http://www.ssisc.org/lis/dl/lis-1.7.9.tar.gz \ | ||
&& tar xf lis.tar.gz \ | ||
&& cd lis-1.7.9 \ | ||
&& ./configure \ | ||
&& make -j$(nproc) install \ | ||
&& cd .. && rm -rf lis-1.7.9 lis.tar.gz | ||
|
||
# Add user jenkins to the image | ||
RUN adduser --uid 500 --disabled-password --gecos "" jenkins \ | ||
# Add user jenkins to sudoers with NOPASSWD | ||
&& echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \ | ||
# Set password for the jenkins user (you may want to alter this). | ||
&& echo "jenkins:jenkins" | chpasswd | ||
|
||
USER jenkins | ||
ENV CCACHE_DIR=/home/jenkins/cache/ccache | ||
RUN mkdir -p $CCACHE_DIR | ||
ENV CCACHE_MAXSIZE=15G | ||
ENV CCACHE_SLOPPINESS=pch_defines,time_macros | ||
ENV CONAN_USER_HOME=/home/jenkins/cache/conan | ||
WORKDIR /home/jenkins | ||
RUN conan user | ||
|
||
### END clang.minimal ### | ||
USER root | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install apt-transport-https curl \ | ||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | ||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" \ | ||
| tee /etc/apt/sources.list.d/yarn.list \ | ||
&& curl -s https://deb.nodesource.com/setup_8.x | bash \ | ||
&& apt-get update && apt-get install -y \ | ||
biber \ | ||
clang-tidy-3.9 \ | ||
cppcheck \ | ||
doxygen \ | ||
graphviz \ | ||
libxml2-utils \ | ||
nodejs \ | ||
pandoc-citeproc \ | ||
yarn | ||
|
||
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 | ||
|
||
# Hugo | ||
RUN curl -L -o hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.32.3/hugo_0.32.3_Linux-64bit.tar.gz \ | ||
&& tar xf hugo.tar.gz \ | ||
&& mv hugo /usr/local/bin/hugo \ | ||
&& rm -rf hugo.tar.gz LICENSE.md README.md | ||
|
||
# Include-what-you-use | ||
RUN curl https://include-what-you-use.org/downloads/include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -O \ | ||
&& tar xf include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -C /usr/ --strip-components=1 \ | ||
&& rm include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz | ||
|
||
USER jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the hack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no enabled check clang-tidy (at least in the way it is invoked by CMake) prints out its usage instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not find another way to specify that this folder should be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I neither do know. ;(
Just add this comment to the "hack", so we are not wondering why...
✅