-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autofix not working #10
Comments
Hey @bejaz-lc . First of all, sorry for not responding. I had not been actively maintaining this repository this past year and ended up missing the notification. Not sure if my answer is useful anymore but in any case I tried to reproduce your issue but wasn't able to. I've opened a test pull request adding several empty newlines to the README file of this repository (#15) and here's the result https://github.com/fernandrone/linelint/actions/runs/10048996615/job/27774177785?pr=15 As can be seen from the logs, the linelinter does fix the file...
However, it does so within the GitHub Action environment. If you want to apply these changes you'd have to run to add a new step that performs a "git push", or maybe opens a pull request from there. Not sure that's something I'd recommend. Here's the .linelint.yml configuration file used, it's pretty much like yours https://github.com/fernandrone/linelint/blob/test-action/.linelint.yml Let me know if that's been helpful 👍🏻 |
@fernandrone thanks for responding. I have tried this and still, the auto fix is not working. Maybe it's because there are many files in my repo which has this error. Does this have any issue with fixing errors when there are a lot of files? |
Hi @arujjval The number of files should not be an issue. Could I see your .linelint.yml file? The github action will take its configuration from there. My best guess is that there's a misconfiguration in the .linelint.yml or something else is preventing the linelint binary from interpreting it. Also if you could share a link to the repository (if it's open source) or reproduce it in an open-source repository it'll be easier for me to help you. Edit: also, here's the code for reading the config file (https://github.com/fernandrone/linelint/blob/test-action/linter/config.go#L42C6-L42C23). If a config file can't be found or there's an error reading it you should see a message like "No configuration file found" and the default config (no autofix) will be used. |
@fernandrone It worked when I put Also, does it support the filtering of files? I mean, I only want to run the check on changed files, not on the whole repo. |
Sorry, I see the issue now. The latest release is actually I've updated release 0.0.6 to be a proper release and it's now showing up in the actions marketplace as intended: |
@fernandrone Thanks! |
Closing this as it's solved. |
I'm using this action in my GitHub actions and autofix is true in .linelint.yml but this only report issues but doesn't auto fix them. I have also granted write permissions to the job in github action using permissions: contents: write.
I'm attaching Screen Shot of the configuration below
The text was updated successfully, but these errors were encountered: