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: Always use latest versions of linting tools; Upgrade clang-format config. #384

Merged
merged 2 commits into from
May 11, 2024

Conversation

LinZhihao-723
Copy link
Member

References

Description

The current listing tools are set to specific versions in our local linting tasks and GitHub linting workflow. However, these versions are getting outdated. For example, clang has released clang-format version 18.1. Linting tool version updating normally includes more formatting standards and bug fixes. We should set the linting tool versions to the latest to apply these updates. Therefore, this PR updates the following things:

  • Ensure lint-requirements.txt to install tools with the latest available versions
  • Update src files with the latest linting tools and formatting

In the future PR, we should set the workflow to run periodically for health-checking purposes.

Validation performed

  • Linting tools worked well using task locally in Linux.
  • Workflow passed, manually checked the tools installed are the latest versions.

@LinZhihao-723 LinZhihao-723 changed the title Drop linting tools' version specifications. Linting: Drop linting tools' version specifications. May 6, 2024
Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Since we're now implicitly upgrading to clang-format 18, can we:

  • Ensure we're not using any newly deprecated options.
  • Add settings for rules introduced in clang-format 18?

clang-format~=17.0
ruff~=0.1
yamllint~=1.33
black>=*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why >=* rather than simply black

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, we should specify a minimum version since our configs will be version specific, and that would be a good way to indicate what version we configured them for.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we set them to the latest versions?

Copy link
Member

@kirkrodrigues kirkrodrigues May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sgtm (the latest versions available on pypi)

@LinZhihao-723
Copy link
Member Author

Nice. Since we're now implicitly upgrading to clang-format 18, can we:

  • Ensure we're not using any newly deprecated options.
  • Add settings for rules introduced in clang-format 18?
  • Removed deprecated options in the latest commit
  • Added config to clang-format 18 new features

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

linting: Always use latest versions of linting tools; Upgrade clang-format config. (#384)

@LinZhihao-723
Copy link
Member Author

How about:

linting: Always use latest versions of linting tools; Upgrade clang-format config. (#384)

lgtm

@LinZhihao-723 LinZhihao-723 changed the title Linting: Drop linting tools' version specifications. linting: Always use latest versions of linting tools; Upgrade clang-format config. May 10, 2024
@LinZhihao-723 LinZhihao-723 merged commit ea2889b into y-scope:main May 11, 2024
11 checks passed
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