Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{Checks: '*,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-hicpp-no-array-decay,-fuchsia-default-arguments,-fuchsia-overloaded-operator,-google-runtime-references,-readability-implicit-bool-conversion,-cppcoreguidelines-pro-bounds-constant-array-index'}
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ dist_doc_DATA = \

EXTRA_DIST = autogen.sh


# Check the C++ source code for white-space errors with clang-format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this blank line.

clang-format:
for i in *.hpp *.h */*.cpp Tests/*/*.*pp; do clang-format -style=file $$i >$$i.fixed; done
for i in *.hpp *.h */*.cpp Tests/*/*.*pp; do diff -su $$i $$i.fixed && rm -f $$i.fixed; done
if ls *.fixed; then exit 1; fi

# Check the C++ source code for errors with clang-tidy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Please remove this blank line.

clang-tidy:
clang-tidy -warnings-as-errors='*' *.hpp *.h */*.cpp Tests/*/*.*pp -- -std=c++11 -x c++ -I./vendor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This odd 🚫 icon above indicates that you have removed the final line feed from the file, and so this line has no line feed. Please configure your text editor to ensure that the file ends with a line feed. I recommend using Vim (MacVim on macOS) or Microsoft Visual Studio Code.

5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ steps:
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang-format-7
sudo apt-get install -y --no-install-recommends clang-format-7 clang-tidy-7
sudo ln -s clang-format-7 /usr/bin/clang-format
sudo ln -s clang-tidy-7 /usr/bin/clang-tidy
displayName: Install clang-format
- script: make clang-format
displayName: Run clang-format
- script: make clang-tidy
displayName: Run clang-tidy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This odd 🚫 icon above indicates that you have removed the final line feed from the file, and so this line has no line feed. Please configure your text editor to ensure that the file ends with a line feed. I recommend using Vim (MacVim on macOS) or Microsoft Visual Studio Code.