-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure linters for C++, MD and Shell
- Loading branch information
1 parent
3d2eb09
commit e6ae8a7
Showing
6 changed files
with
45 additions
and
11 deletions.
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,3 @@ | ||
{ | ||
"MD013": false | ||
} |
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 @@ | ||
# shellcheck | ||
disable=SC2038 |
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,26 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Lint all files in the project. | ||
# Expected to be run from the root of the project. | ||
# Expected tools to be installed on the system. | ||
# Usage: ./scripts/lint-all.sh | ||
|
||
set -e | ||
set -x | ||
|
||
# Lint all C++ files in the project. | ||
find include/ examples/ src/ -name "*.h" -o -name "*.cpp" | xargs clang-format -i -style=file || echo "clang-format failed." | ||
echo "All C++ files were linted." | ||
|
||
# Lint all scripts in the project. | ||
find scripts/ -name "*.sh" | xargs shellcheck || echo "shellcheck failed." | ||
echo "All scripts files were linted." | ||
|
||
# TODO: Lint all CMake files in the project. | ||
# echo "All CMake files were linted." | ||
|
||
# Lint all Markdown files in the project. | ||
find README.md examples/ -name "*.md" | xargs markdownlint -f || echo "markdownlint failed." | ||
echo "All Markdown files were linted." |
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