Skip to content

Commit f07786c

Browse files
authored
Merge pull request #96 from intern4tional/enhancement/yaml
enhancement: add support for specifying coding standards filename and…
2 parents 231140d + 89e30a6 commit f07786c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deviations:
2+
- rule-id: "A0-1-1"
3+
query-id: "cpp/autosar/useless-assignment"
4+
justification: "This useless assignment is required."
5+
background: |
6+
## Useless assignments
7+
8+
We don't want to use useless assignments because they are useless.
9+
- rule-id: "A0-4-2"
10+
justification: "long double is required for interaction with third-pary libraries."
11+
code-identifier: "a0-4-2-deviation"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
deviations:
2+
- rule-id: "A0-1-2"
3+
justification: |
4+
The return values in this file are not required because ...
5+
path: "nested2"

scripts/deviations/process_coding_standards_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ def main():
105105
f"The specified working directory '{args.working_dir}'' does not exist.", file=sys.stderr)
106106
sys.exit(1)
107107

108-
# Find all the coding-standards.yml files, and convert them in place to coding-standards.xml
109-
for path in args.working_dir.rglob('coding-standards.yml'):
108+
# Find all coding standards deviations files, and convert them in place to coding-standards.xml
109+
for config_file_name in ['coding-standards.yml', 'coding-standards.yaml']:
110+
for path in args.working_dir.rglob(config_file_name):
110111
convert_yaml_file_to_xml(path)
111112

112113
if not args.skip_indexing:

0 commit comments

Comments
 (0)