https://github.com/cp-dharti-r/devops-golang-lint
Configured workflow for Linting, Formatting and the Pre-commit hook to run prettier before the commit
https://github.com/cp-dharti-r/devops-golang-lint
formatting golang golang-lint golint precommit-hooks
Last synced: 3 months ago
JSON representation
Configured workflow for Linting, Formatting and the Pre-commit hook to run prettier before the commit
- Host: GitHub
- URL: https://github.com/cp-dharti-r/devops-golang-lint
- Owner: cp-dharti-r
- Created: 2024-06-04T06:23:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-06T07:40:31.000Z (about 1 year ago)
- Last Synced: 2025-02-11T13:52:38.922Z (5 months ago)
- Topics: formatting, golang, golang-lint, golint, precommit-hooks
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linting Golang code
Configure workflow for Linting, Formatting and the Pre-commit hook to formate code before the commit
Performed things,
- Enforce naming conventions for files and folder names
- Enforce naming conventions for variables and function names
- Limit the line length to a maximum of 100 characters
- Limit the max 300 lines for files
- Limit the max 30 lines for functions
- Format code
- Ignore check in non-go files
- Write GitHub CI script to run lint
- Configure the Pre-commit hook to formate code before the commit
- Configure the script to run Lint as part of the CI/CD pipeline.
- Setup to runs the linting process on each commit.