feature-sliced / steiger

Universal file structure and project architecture linter
https://www.npmjs.com/package/steiger
MIT License
48 stars 3 forks source link

Exit with code 1 when errors are found #59

Closed daniilsapa closed 1 month ago

daniilsapa commented 1 month ago

Resolves #56

daniilsapa commented 1 month ago

Hi @illright Could you review it when you have time?

I had to change the autofixing logic a bit to accomplish this task. Also I noticed several issues with autofix engine and also possible improvements

Issues that I noticed so far:

I saw open tickets to improve the autofix mechanism and realized that this was a separate complex problem within this project.

Possible issues/improvements that I think are worth discussion:

I think we need to manipulate some kind of virtual file system and then when we are sure that a needed fix (or a sequence of fixes, e.g. "move" -> "rename" -> "fix import statements inside") is possible to apply without errors, we commit it to the real FS.

Let's create a separate discussion. Because it feels like a complex problem that needs a lot of discussions

daniilsapa commented 1 month ago

Oh, yes, sorry. I forgot to push that commit yesterday

daniilsapa commented 1 month ago

@illright I created a separate discussion where I drafted my vision/ideas of the engine, so we can groom it in one place and not scatter around the auto-fix-related issues. Looking forward to seeing your ideas on the auto-fix engine there!