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

custom lint rules for Lua code #28372

Open
justinmk opened this issue Apr 16, 2024 · 2 comments
Open

custom lint rules for Lua code #28372

justinmk opened this issue Apr 16, 2024 · 2 comments
Labels
ci automation for build, test, and release enhancement feature request lua stdlib test
Milestone

Comments

@justinmk
Copy link
Member

justinmk commented Apr 16, 2024

Problem

We have clint.py for defining custom C lint rules, but we don't have a way to define custom rules for Lua code.

Expected behavior

Introduce a build/CI task that allows us to define custom lint rules. Examples:

  • disallow use of assert.truthy, recommend ok() / eq() / etc
  • check it() descriptions
  • comment format
  • naming conventions
  • ...

Related

@justinmk justinmk added enhancement feature request test ci automation for build, test, and release lua stdlib labels Apr 16, 2024
@clason
Copy link
Member

clason commented Apr 16, 2024

To be clear, these are semantic rules on top of Stylua's syntactic linting (which will have to be agreed on).

@justinmk justinmk added this to the backlog milestone Apr 16, 2024
@CppCXY
Copy link

CppCXY commented Apr 18, 2024

Although my project is not well-known and has only recently started testing, but I have extensive experience in developing lua tool. I hope you will also consider implementing CI based on my project(my project will attempt to be 100% compatible with luals syntax, as well as provide a more friendly API)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci automation for build, test, and release enhancement feature request lua stdlib test
Projects
None yet
Development

No branches or pull requests

3 participants