clarinet
                                
                                 clarinet copied to clipboard
                                
                                    clarinet copied to clipboard
                            
                            
                            
                        Improve clarinet's clarity linter
Linting rules can be configured to be “off”, “info”, “warning” or “error”. Default value is indicated here between parenthesis.
- dead code
- unused constant (warning)
- unused function parameter (warning)
- unused let binding (warning)
- unused private function (warning)
 
- unsafe
- avoid unwrap-panic (warning)
- avoid unwrap-err-panic (warning)
 
- prefer native function aliases (introduced in clarity 2 and versions to come)
- prefer element-at? (instead of element-at) (warning)
- prefer index-of? (instead of index-of) (warning)
- prefer bit-xor (instead of xor) (warning)
 
- convention
- invalid naming case (info)
 
We could also add a check for a function that is defined as public but could be readonly. It should always be preferred to make the function read-only if it doesn't need to modify any state so that it is clear that it can be called via the API.