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

Linting #211

Open
lukem12345 opened this issue Mar 2, 2024 · 1 comment
Open

Linting #211

lukem12345 opened this issue Mar 2, 2024 · 1 comment
Assignees
Labels
code-quality enhancement New feature or request

Comments

@lukem12345
Copy link
Member

We should add some linting rules to this and other AJ repos. Possible rules include:

  • 2-space indentation
  • Consistent naming conventions for schemas (Sch...)
  • Docstrings for exported functions and objects
  • Examples in such docstrings where applicable
  • Scheme and Lisp style trailing parentheses (on the last line) rather than C-style (closing braces on following lines)
@quffaro
Copy link
Contributor

quffaro commented Mar 15, 2024

There is a julia-action called julia-format that looks promising!

It uses JuliaFormatter, which offers OOTB:

does not offer OOTB:

  • consistent naming conventions for schemas
  • docstrings for exported functions and objects
  • examples in docstrings
  • scheme/lisp style trailing parentheses

However the Custom Styles page suggests that it is possible to overload style functions to enforce these patterns.

The julia-format action either creates changes in the code or creates PRs (noisy, but safe; no direct changes to code). Should we add it to our github actions?

The roadmap for implementation:

  • implementing AlgebraicJulia-wide style into the .github repo
  • investigating if we can include repo specific styles (e.g., "Consistent naming conventions for schemas")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants