Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix generating ignore list when one exists already
Generating an ignore list is done by running Rubocop over all the files in the project to detect which have errors, and then writing that list of files to `.standard_todo.yml`. When a file was already ignored in `.standard_todo.yml`, Rubocop would be configured to not run cops against it. In that case, no errors were reported, so the file would not be written to `.standard_todo.yml`. This leads to a situation where if a file is ignored, running `standardrb --generated-todo` would remove it from the todo list, and add all other files with errors. Running the same command again would then flip the file list. We fix this by setting the list of ignored files to an empty array before running Rubocop in the `genignore` runner.
- Loading branch information