-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.mega-linter.yml
152 lines (126 loc) · 3.91 KB
/
.mega-linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# SPDX-FileCopyrightText: © 2022 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: MIT
---
APPLY_FIXES: all # all, none, or list of linter keys.
# Example for key: GIT_GIT_DIFF uncomment to run only that linter.
# ENABLE_LINTERS: [CPP_CLANG_TIDY]
# DEBUG - verbose output of command calls with respective arguments.
# INFO - moderate output with linting statistics.
# ERROR - minimum output only in case of error.
LOG_LEVEL: INFO
# Linters that are not supported by cit but enabled for all megalinter images.
DISABLE_LINTERS:
[
ACTION_ACTIONLINT,
C_CPPLINT,
COPYPASTE_JSCPD,
CREDENTIALS_SECRETLINT,
JAVASCRIPT_STANDARD,
JSON_JSONLINT,
JSON_ESLINT_PLUGIN_JSONC,
JSON_V8R,
JSON_PRETTIER,
MARKDOWN_MARKDOWNLINT,
MARKDOWN_MARKDOWN_LINK_CHECK,
MARKDOWN_MARKDOWN_TABLE_FORMATTER,
SPELL_MISSPELL,
YAML_V8R,
]
# Policies.
FAIL_IF_MISSING_LINTER_IN_FLAVOR: true
FAIL_IF_UPDATED_SOURCES: true
FORMATTERS_DISABLE_ERRORS: false
# Reports style.
SHOW_ELAPSED_TIME: true
FILEIO_REPORTER: false # Enable only if runner has internet connection.
PRINT_ALPACA: false # Don't print logo.
FILTER_REGEX_EXCLUDE: ".*/third_party/.*.hpp"
# GIT_DIFF
GIT_GIT_DIFF_ARGUMENTS: HEAD^
# GIT_COMMITLINT
GIT_COMMITLINT_ARGUMENTS: --to HEAD
# GIT_SPELL
GIT_GIT_SPELL_CONFIG_FILE: ci/checks/dictionaries/cspell.json
# LS_SPELL
LS_LS_SPELL_CONFIG_FILE: ci/checks/dictionaries/cspell.json
# MARKDOWN_REMARK_LINT
MARKDOWN_DEFAULT_STYLE: "remark-lint"
MARKDOWN_REMARK_LINT_CONFIG_FILE: "rc.yaml"
# MARKDOWN_TEXTLINT
MARKDOWN_TEXTLINT_FILTER_REGEX_EXCLUDE: "license.md"
# BASH_EXEC.
ERROR_ON_MISSING_EXEC_BIT: true
# YAML_YAMLLINT.
YAML_YAMLLINT_ARGUMENTS: "-s" # Strict.
# SPELL_CSPELL.
SPELL_CSPELL_CONFIG_FILE: ci/checks/dictionaries/cspell.json
SPELL_CSPELL_FILE_EXTENSIONS: "*"
# NIX_LINTER
NIX_NIX_LINTER_FILTER_REGEX_EXCLUDE: "node-env.nix|node-packages.nix"
# SPELL_CODESPELL.
SPELL_CODESPELL_ARGUMENTS: >
-D=-
-D=ci/checks/dictionaries/spelling_corrections.txt
--skip="sources/example_glassy/third_party/sources"
# CMAKE_FORMAT
CMAKE_CMAKE_FORMAT_DISABLE_ERRORS: true
# CPP_CPPLINT.
CPP_CPPLINT_ARGUMENTS: >
--recursive
--linelength=80
--includeorder=standardcfirst
--filter=-build/c++11,-build/header_guard,-runtime/references,-readability/check,-readability/nolint
--root=./sources
# CPP_CPPCHECK
CPP_CPPCHECK_PRE_COMMANDS:
- command: >
rm -rf ./build_gcc/*;
mkdir -p report/linters_logs/cppcheck_raw;
./ci/builders/common/cmake_setup.sh g++ gcc 12;
cmake -B build_gcc -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake";
cwd: "root"
continue_if_failed: false
# Absolute paths needed so that CodeChecker doesn't try to search for files
# with relative paths.
CPP_CPPCHECK_POST_COMMANDS:
- command: >
find . -name '*.plist' -exec sed -i 's?sources?'`pwd`'/sources?' {} +
cwd: "root"
continue_if_failed: false
CPP_CPPCHECK_ARGUMENTS: >
--cppcheck-build-dir=build_gcc
--project=build_gcc/compile_commands.json
--library=./.config/cppcheck/doctest.cfg
--error-exitcode=1
--enable=all
--inline-suppr
--inconclusive
--suppress=unusedFunction
--suppress=unusedStructMember
--suppress=unmatchedSuppression
--suppress=missingIncludeSystem
--plist-output=report/linters_logs/cppcheck_raw
# CLANG_TIDY
CPP_CLANG_TIDY_PRE_COMMANDS:
- command: >
rm -rf ./build_clang/*;
./ci/builders/common/cmake_setup.sh clang++ clang 14;
cmake -B build_clang -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake";
cwd: "root"
continue_if_failed: false
CPP_CLANG_TIDY_ARGUMENTS: >
-header-filter='^(u(i[^_]|[^i])|[^u])+$'
-p=build_clang
-use-color=false
POST_COMMANDS:
- command: >
ci/checks/code_checker_reports_convert.sh
cwd: "root"
continue_if_failed: false