How to actually skip directories in golangci-lint? #2903
              
                Unanswered
              
          
                  
                    
                      roshan-rubrik
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 2 replies
-
| 
         Stumbling here after few years, I want to exclude code generated using go generate or other tools (sqlc, openapicodegen, etc). Should be a common scenario for many. Is the Stack Overflow answer still relevant today?  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Golangci-lint doesn't give option to actually skip directories. The skip-dirs option is not skipping the directory, It just skips the reporting issues from that directory. Is there way to actually skip directories?
I am aware of this stackoverflow thread. This provides an option to actually skip files. I want to skip directories. Adding codeanalysis tag in each file is not a option for us.
In gometalinter, we had option to actually exclude directories. Why did similar option is not given in the golangci-lint?
Beta Was this translation helpful? Give feedback.
All reactions