File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
integration-tests/deviations Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
1
+ deviations :
2
+ - rule-id : " A0-1-2"
3
+ justification : |
4
+ The return values in this file are not required because ...
5
+ path : " nested2"
Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ def main():
87
87
action = 'store_true' ,
88
88
help = 'Skip indexing the configurations and only convert them to XML. Should be used with --save-temps.'
89
89
)
90
+ parser .add_argument (
91
+ '--coding-standards-file' ,
92
+ help = 'Filename and extension of coding standards deviations file. Default is coding-standards.yml' ,
93
+ required = False ,
94
+ default = "coding-standards.yml"
95
+ )
90
96
args = parser .parse_args ()
91
97
92
98
if not args .skip_indexing :
@@ -105,8 +111,15 @@ def main():
105
111
f"The specified working directory '{ args .working_dir } '' does not exist." , file = sys .stderr )
106
112
sys .exit (1 )
107
113
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' ):
114
+ # Verify that the coding standards deviations file exists
115
+ coding_standards_file = Path (args .coding_standards_file )
116
+ if not coding_standards_file .is_file ():
117
+ print (
118
+ f"The specified coding standards deviations file '{ args .coding_standards_file } ' does not exist" , file = sys .stderr )
119
+ sys .exit (1 )
120
+
121
+ # Find all coding standards deviations files, and convert them in place to coding-standards.xml
122
+ for path in args .working_dir .rglob (args .coding_standards_file ):
110
123
convert_yaml_file_to_xml (path )
111
124
112
125
if not args .skip_indexing :
You can’t perform that action at this time.
0 commit comments