Closed kfcampbell closed 6 months ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
Setup of Automated Code Quality Checks
We've now put a system in place (through a file named .github/workflows/lint.yml
) that automatically checks our code's quality every time updates are made to the main branch or new code proposals are put forward. This helps us to ensure that the code we produce is up to the mark and follows best practices. This system uses a tool known as golangci-lint
to perform these checks.
Configurations for Code Checks
A file named .golangci.toml
has been added that specifies how the aforementioned automated code checks should behave. It includes a list of checks that are to be performed and provides additional settings for how they should evaluate the code.
Improvements to Code Documentation
The file pkg/authentication/example_test.go
has been modified to improve how it explains what certain parts of our code do. A function within this file, ExampleUnauthenticatedRequest
, has been renamed to ExampleApiClient_Octocat
, and we've added additional comments to describe its purpose more optimally. We've also updated some parts of this function to improve its output.
Script to Manually Run Code Checks
A new file named script/lint.sh
has been added that allows you to manually implement the golangci-lint
check on our repository. This script ensures the necessary version of golangci-lint
is installed and then initiates the code analysis.
This PR adds linting to the project with a configuration derived from an internal project. I've added
script/lint.sh
for local invocations and.github/workflows/lint.yml
for PR invocations. As a bonus, we should see annotations on our PRs when linting errors are introduced.I've had to ignore one error in our generated code: in
pkg/github/markdown/raw_request_builder.go
, this line does not check for errors when executing. As this is an upstream Kiota issue, I've chosen to ignore it for now.