Skip to content
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

feat: improve DX #71

Merged
merged 5 commits into from
Jun 14, 2024
Merged

feat: improve DX #71

merged 5 commits into from
Jun 14, 2024

Conversation

AlejandroSuero
Copy link
Contributor

@AlejandroSuero AlejandroSuero commented Jun 14, 2024

Improving the developer experience of checking for formatting, linting and spelling errors.

Added selene and codespell both locally with make lint and make spell, and in CI with an action for each of them.


It could be nice to include commitlint for maintaining a conventional commit log.

@scottmckendry
Copy link
Owner

Just curious about what benifit selene provides over stylua? From my perspective, they both achieve the same thing. I would imagine if there are any style issues in Lua files both linters will be picking up the same thing, right?

@scottmckendry scottmckendry added the waiting for op This issue is waiting for a response from the original poster label Jun 14, 2024
@AlejandroSuero
Copy link
Contributor Author

@scottmckendry no, selene is a linter like luacheck but more up to date and with better rules, for example to modified rules for luacheck you have to pass the number of the rule like "122", unlike with selene, you pass human readable rules like unscoped_variables.

selene for example will detect deprecated usage of APIs or unused arguments which can be escaped with _. Or it can be used for detecting the use of global variables and such, more like lua_ls and less like stylua which will check for styling rules.

@scottmckendry scottmckendry removed the waiting for op This issue is waiting for a response from the original poster label Jun 14, 2024
@scottmckendry
Copy link
Owner

Understood, thanks for clarifying. It sounds like it would be nice to have in the workflow. Just need to resolve the Node16 warnings in the job before we merge 😉

Would also be curious to see how you'd go about implementing commitlint. I'm a big fan of the conventional commits spec!

I've heard good things about commitizen too for local DX.

@AlejandroSuero
Copy link
Contributor Author

@scottmckendry commitizen looks great, I am developing something similar but combined with the ability of linting commits like commitlint does.

If you want to check it out https://github.com/AlejandroSuero/go-commitlint.

Also I am curious on how you are doing the CHANGELOG.md cause I am creating a template.nvim and I would like to implement it or at least mention how to set it up in the README.md.

@scottmckendry
Copy link
Owner

Great stuff! Looking forward to seeing how those projects progress 🙂

I've recently started using release-please for all of my projects to handle semver and changelogs for releases. It works well with convention commits.

@AlejandroSuero
Copy link
Contributor Author

Great stuff! Looking forward to seeing how those projects progress 🙂

I've recently started using release-please for all of my projects to handle semver and changelogs for releases. It works well with convention commits.

I will try it out in an extension for using freeze that I have changes that will be nice to have a release on.

AlejandroSuero and others added 5 commits June 15, 2024 10:57
`selene` for linting `.lua` files
`codespell` to check for misspelled words

Added `Makefile` for easy use of linting and spellchecking while coding
@scottmckendry
Copy link
Owner

Looks good, I've just done a quick rebase off of main to resolve the failing ci job. I think I'll also do a quick test with cargo to see how that looks too. Saves you from having to maintain your action fork just for this repo!

If it doesn't work, we can revert and stick with the fork.

@scottmckendry scottmckendry merged commit b7c5f5b into scottmckendry:main Jun 14, 2024
6 checks passed
@AlejandroSuero AlejandroSuero deleted the feature/improve-dx branch June 14, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants