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

add linter action and task, fix append bug in sql/client #194

Merged
merged 2 commits into from
Aug 17, 2023
Merged

add linter action and task, fix append bug in sql/client #194

merged 2 commits into from
Aug 17, 2023

Conversation

jchappelow
Copy link
Member

No description provided.

@jchappelow jchappelow marked this pull request as ready for review August 17, 2023 18:28
Comment on lines -196 to 198
pks := make([][]byte, len(primaryKeys))
pks := make([][]byte, 0, len(primaryKeys))
for _, primaryKey := range primaryKeys {
pks = append(pks, primaryKey.Blob())
Copy link
Member Author

Choose a reason for hiding this comment

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

The makezero linter that I've enabled in CI found this bug.

@@ -48,6 +48,13 @@ jobs:
run: |
task pb:compile:v1

- name: golangci-lint
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this step change the code?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, linters only report issues, but don't change anything.

The new task fmt will change it however, but that's not in CI.

Yaiba
Yaiba previously approved these changes Aug 17, 2023
Copy link
Contributor

@Yaiba Yaiba left a comment

Choose a reason for hiding this comment

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

LGTM

@jchappelow
Copy link
Member Author

LGTM

Thx. Just testing something else right now, pls don't merge yet

@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.4% 1.4% Duplication

@jchappelow
Copy link
Member Author

OK guys, good to go. Some things to note:

  • new task: task lint run the linter on all the code.
  • task alias: task tools is an alias for task install:deps since I could never remember that
  • the tools are now specified in a regular text file instead of using a wonky exluded go file with the module versions in the go.mod, which was sorta an abuse of the repo's go.mod. Command line tools (main packages) are installed like go install whereever.com/org/thing/cmd/tool@latestOrVersion, which is what it does now.

We should set up our IDEs to lint on save and/or run task lint before we push anything to avoid failing CI unnecessarily.

Copy link
Contributor

@Yaiba Yaiba left a comment

Choose a reason for hiding this comment

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

A big step forward for kwil

@Yaiba Yaiba merged commit bd5ff40 into main Aug 17, 2023
2 of 3 checks passed
@Yaiba Yaiba deleted the lint branch August 17, 2023 19:41
@jchappelow jchappelow added this to the v0.6.0 milestone Sep 28, 2023
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