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

Feat: add kclvm_cli lint command to kclvm_cli #156

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

He1pa
Copy link
Contributor

@He1pa He1pa commented Aug 16, 2022

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

2. What is the scope of this PR (e.g. component or file name):

main.rs

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

add kclvm_cli lint command to call resolver lint check and skip runtime

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@He1pa He1pa mentioned this pull request Aug 16, 2022
16 tasks
@He1pa He1pa added tool Issues or PRs related to kcl tools inlucding format, lint, validation, document tools, etc. feat labels Aug 16, 2022
@He1pa He1pa added this to the v0.4.3 Release milestone Aug 16, 2022
@coveralls
Copy link
Collaborator

coveralls commented Aug 16, 2022

Pull Request Test Coverage Report for Build 2945654387

  • 27 of 28 (96.43%) changed or added relevant lines in 2 files are covered.
  • 539 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.2%) to 60.113%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/tools/src/lint/mod.rs 16 17 94.12%
Files with Coverage Reduction New Missed Lines %
kclvm/compiler/src/codegen/llvm/context.rs 2 74.15%
kclvm/runtime/src/_kclvm.rs 3 25.0%
kclvm/runtime/src/stdlib/plugin.rs 3 0%
kclvm/runtime/src/_kclvm_addr.rs 7 0%
kclvm/span/src/symbol.rs 10 60.0%
kclvm/parser/src/parser/expr.rs 13 81.58%
kclvm/runtime/src/api/utils.rs 26 18.33%
kclvm/runtime/src/api/kclvm.rs 33 46.88%
kclvm/runtime/src/types/api.rs 40 0%
kclvm/compiler/src/codegen/llvm/node.rs 60 89.62%
Totals Coverage Status
Change from base Build 2926438501: 0.2%
Covered Lines: 23018
Relevant Lines: 38291

💛 - Coveralls

kclvm/src/main.rs Outdated Show resolved Hide resolved
kclvm/src/main.rs Show resolved Hide resolved
Peefy
Peefy previously approved these changes Aug 25, 2022
Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

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

LGTM

@He1pa He1pa changed the title [WIP] Feat: add kclvm_cli lint command to kclvm_cli Feat: add kclvm_cli lint command to kclvm_cli Aug 25, 2022
zong-zhe
zong-zhe previously approved these changes Aug 25, 2022
Copy link
Contributor

@zong-zhe zong-zhe left a comment

Choose a reason for hiding this comment

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

LGTM

add USAGE:
    kclvm_cli lint [FLAGS] [OPTIONS] [--] [INPUT]... command to call resolver lint check and skip runtime
Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

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

LGTM

kclvm/tools/src/lint/mod.rs Show resolved Hide resolved
Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

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

LGTM

@zong-zhe zong-zhe self-requested a review August 29, 2022 12:29
Copy link
Contributor

@zong-zhe zong-zhe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

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

LGTM

@Peefy Peefy merged commit 1eef77e into kcl-lang:main Aug 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat tool Issues or PRs related to kcl tools inlucding format, lint, validation, document tools, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants