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

Split up ink_linting into two dylint libraries #2006

Closed
jubnzv opened this issue Nov 28, 2023 · 1 comment · Fixed by #2032
Closed

Split up ink_linting into two dylint libraries #2006

jubnzv opened this issue Nov 28, 2023 · 1 comment · Fixed by #2032
Assignees
Labels
A-linter Issue regarding the ink! linter. B-feature-request A request for a new feature.

Comments

@jubnzv
Copy link
Member

jubnzv commented Nov 28, 2023

ink_linting should be split up into two dylint-based libraries: ink_linting and ink_linting_extra.

In cargo-contract, we require only the essential lints that detect compilation errors in ink!; these are executed each time a contract is built. The lints from ink_linting_extra should remain optional, being executed only upon direct user request (e.g. cargo contract build --extra-lints). This approach is intended to speed up the build process.

For more context see: use-ink/cargo-contract#1412 (comment)

@jubnzv jubnzv added B-feature-request A request for a new feature. A-linter Issue regarding the ink! linter. labels Nov 28, 2023
@jubnzv jubnzv self-assigned this Nov 28, 2023
@jubnzv jubnzv changed the title Split up ink_linting to two dylint libraries Split up ink_linting into two dylint libraries Nov 28, 2023
@deuszx
Copy link

deuszx commented Dec 10, 2023

Hi. Are you aware of scout?

jubnzv added a commit to jubnzv/ink that referenced this issue Dec 21, 2023
Split `ink_linting` to `ink_linting_mandatory` and `ink_linting`.

Mandatory lints will be integrated in the `cargo-build` build
process in use-ink/cargo-contract#1412.

Extra lints are optional and could be run by the contract developer to
highlight possible issues with secure coding style and to check the
compliance with best practices.

For more information about this design decision, see: use-ink/cargo-contract#1412 (comment).

Closes use-ink#2006
ascjones pushed a commit that referenced this issue Jan 3, 2024
* feat(linter): Split `ink_linting` into two libraries

Split `ink_linting` to `ink_linting_mandatory` and `ink_linting`.

Mandatory lints will be integrated in the `cargo-build` build
process in use-ink/cargo-contract#1412.

Extra lints are optional and could be run by the contract developer to
highlight possible issues with secure coding style and to check the
compliance with best practices.

For more information about this design decision, see: use-ink/cargo-contract#1412 (comment).

Closes #2006

* chore: Update CHANGELOG

* feat: Run linting tests in github-actions

* fix(ci): Add caching for `linting` builds

* fix(ci): gh-actions syntax

* fix(ci)

* fix(ci): Remove `--locked` flag for linting

This is necessary, because the lockfile needs to be updated since we run
build with a different `rust-toolchain.yml`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Issue regarding the ink! linter. B-feature-request A request for a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants