Skip to content

Improve ink_linting integration #1473

@jubnzv

Description

@jubnzv

The current workflow with the linter should be improved in future releases.

Here is a list of related tasks that need improvement. I suggest using this as a tracking issue, so we can address these in a few PRs to make it easier to discuss and review:

  • The installation process of the toolchain and the dependencies required for the linter could be improved. In my opinion, we should automate their installation to enhance the user experience. However, it's important to make this process explicit for the user and to ask for their confirmation, because that installation requires significant disk space and network resources for downloading. At the same time, there should be an option to bypass any interactive interaction with the user to avoid breaking CI systems for contracts. Note that this automation might be additionally tested for crossplatform support, especially on Windows and MacOS.
  • Test coverage for the linter integration should be improved. In particular, we should add more tests to check the installation of different components of the toolchain.
  • Introduce the separate cargo contract lint option alongside the build option. First, it might be more convenient for the user than calling cargo contract build --build_artifact="check-only" or just build --lint which actually builds the project. Second, in the future the separate command might be used to customize the linter from CLI (like cargo-clippy).
  • The build Docker image should include the required version of nightly toolchain to make it possible to run mandatory lints inside the container.

Related PR: #1412

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions