Skip to content

askrella/go-linters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Askrella Go Linters

This is a collection of custom Go linters that we use to enforce best practices in our code.

Linter Rules

Infinite Loop

This linter checks for infinite loops by ensuring that every loop has an integer based counter as a guardrail. The decision to use an integer based counter is to ensure that the loop will never run indefinitely. We conciously decided to limit the guardrail to use an integer based counter, because in the past (game development) we encountered fatal issues when the guardrail was based on a float due to floating point precision issues (e.g. when coming too close to the precision limits where the float comparison for f1 == f2 would be true despite being incremented by a very small amount).

This linter will report a warning if it finds a loop that does not have an integer based counter as a guardrail or other loop features preventing it from running indefinitely (e.g range statements, context timeouts).

About

Some opinionated linters used at Askrella

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published