File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed
Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -120,22 +120,19 @@ jobs:
120120
121121 with open('.pyspelling.yml', 'r') as f:
122122 config = yaml.safe_load(f)
123-
124- # Modify only the sources in each matrix entry
123+
124+ new_matrix = []
125125 for matrix in config['matrix']:
126- matrix['sources'] = ['$file']
127-
126+ d # Check if the file extension matches the matrix name
127+ if (('python' in matrix['name'].lower() and '$file'.endswith('.py')) or
128+ ('rest' in matrix['name'].lower() and '$file'.endswith('.rst')) or
129+ ('markdown' in matrix['name'].lower() and '$file'.endswith('.md'))):
130+ matrix_copy = matrix.copy()
131+ matrix_copy['sources'] = ['$file']
132+ new_matrix.append(matrix_copy)
133+
134+ config['matrix'] = new_matrix
135+
128136 with open('temp_config.yml', 'w') as f:
129137 yaml.dump(config, f, default_flow_style=False)
130138 EOF
131-
132- if ! pyspelling -c temp_config.yml; then
133- FINAL_EXIT_CODE=1
134- fi
135- fi
136- done
137-
138- if [ $FINAL_EXIT_CODE -ne 0 ]; then
139- echo "Spell check failed!"
140- exit 1
141- fi
You can’t perform that action at this time.
0 commit comments