easystats / workflows

GitHub Actions for {easystats} packages
https://indrajeetpatil.github.io/preventive-r-package-care
Creative Commons Zero v1.0 Universal
10 stars 1 forks source link

Specify changes to linter defaults in the GHA itself #5

Closed IndrajeetPatil closed 2 years ago

IndrajeetPatil commented 2 years ago

Instead of including .lintr in every repo in the organization and keeping them all in sync with each other.

IndrajeetPatil commented 2 years ago

Works, so .lintr in every repo in the organization should be deleted.

strengejacke commented 2 years ago

The lintr files are also used by vscode, that's why I primarily added them

IndrajeetPatil commented 2 years ago

What do you mean, they are "used by" VS Code? Does VS Code lint every time you make any change to the source code?

I'd prefer if we rely on GHA for this so that everyone is on the same page. Additionally, GHA uses the latest lintr from GitHub, so we are always up-to-date.

strengejacke commented 2 years ago

What do you mean, they are "used by" VS Code? Does VS Code lint every time you make any change to the source code?

Yes, it's "live" linting. If you open any file, linting is applied, based on the .lintr file.

(only first seconds, and from 0:42 is interesting here)

https://user-images.githubusercontent.com/26301769/188485165-0cc6b605-30f4-4ec1-bac1-8de7b12f9060.mp4

See also https://lintr.r-lib.org/articles/editors.html

strengejacke commented 2 years ago

If you don't have a .lintr file, the defaults are used. But maybe I can also define defaults globally, not workspace specific.

IndrajeetPatil commented 2 years ago

Closing this since it is already implemented.

@strengejacke Okay, I won't delete the .lintr files, but make sure to check in on this action once in a while to see which defaults we are choosing and syncing the local file with those settings.

https://github.com/easystats/workflows/blob/db1b951367207b5b9bb45d29f97107466fde9c86/.github/workflows/lint.yaml#L31-L43