Skip to content

Commit

Permalink
create cspell report dirs if required (#1399)
Browse files Browse the repository at this point in the history
* fix(cspell): Create config dirs if missing

If a cspell config is located in some directory we need to create the same tree under the `report` dir

* docs(CHANGELOG): added fix note

Co-authored-by: Nicolas Vuillamy <nicolas.vuillamy@gmail.com>
  • Loading branch information
andrewasheridan and nvuillam committed Apr 10, 2022
1 parent 707c5f6 commit 38f9f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-l
- Display plugin URL in MegaLinter output logs ([[#1340](https://github.com/megalinter/megalinter/issues/1340))
- Fix public glibc public key download
- Fix `no override and no default toolchain set` when lint rust with clippy via github-action ([#975](https://github.com/megalinter/megalinter/issues/975))
- Fix cspell FileNotFound error by creating subdirectories under `report` as required ([#1397](https://github.com/megalinter/megalinter/issues/1397]))

- Doc
- Add instructions to upload artifacts when using MegaLinter with Jenkins
Expand Down
1 change: 1 addition & 0 deletions megalinter/linters/CSpellLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def complete_text_reporter_report(self, reporter_self):
+ os.path.sep
+ reporter_self.master.config_file_name
)
os.makedirs(os.path.dirname(proposed_cspell_config_file), exist_ok=True)
with open(proposed_cspell_config_file, "w", encoding="utf-8") as outfile:
json.dump(data, outfile, indent=4, sort_keys=True)
proposed_cspell_config_file = utils.normalize_log_string(
Expand Down

0 comments on commit 38f9f58

Please sign in to comment.