[PHP-CS-Fixer] How to apply fixes (on risky rules) #3973
                  
                    
                      llaville
                    
                  
                
                  started this conversation in
                Show and tell
              
            Replies: 2 comments 1 reply
-
| 
         Great overview! Is it limited to diff in the console, or could be applied to the repo that is ran by megalinter too?  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| 
         @llaville amazing doc :)  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 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.
-
If you are a senior developer and know well concept of PHP-CS-Fixer, you probably know that fixing rules is simple.
Standard Rules
.php-cs-fixer.phpor whatever other name--dry-runoptionBut it only works for standard rules (not risky rules).
Risky Rules
If you want to follows (for example) this
.php-cs-fixer.risky.phpconfig file :And checks your source code with following command :
You'll get such Exception
To avoid such issue, you need to add extra arguments to your
.mega-linter.ymlconfig file, like that :And the results may be look like to :
Beta Was this translation helpful? Give feedback.
All reactions