-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php-cs-fixer allow risky option #1614
Changes from 5 commits
93ac2a0
b57e5ac
907ca37
3655f2e
6f2354d
267082d
449d95b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,12 @@ module.exports = { | |
type: 'string' | ||
default: "" | ||
description: "Add rule(s). i.e. line_ending,-full_opening_tag,@PSR2 (PHP-CS-Fixer 2 only)" | ||
allow_risky: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! Don't forget to regenerate the documentation with See https://github.com/Glavin001/atom-beautify/blob/master/docs/add-languages-and-beautifiers.md#options-documentation for details. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should have probably seen this documentation from start 👍 . Well everything should be ready now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good! |
||
title: "Allow risky rules" | ||
type: 'string' | ||
default: "no" | ||
enum: ["no", "yes"] | ||
description: "allow risky rules to be applied!" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add |
||
phpcbf_path: | ||
title: "PHPCBF Path" | ||
type: 'string' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5852,6 +5852,24 @@ | |
"namespace": "php" | ||
} | ||
}, | ||
"allow_risky": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be automatically generated. I do not see a change to the PHP language adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Glavin001 I haven't really worked with modules before, this was my first time and I did not know about the autogeneration part, but i got it now, I also committed the change to the language file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem! Getting closer. |
||
"title": "Allow risky rules", | ||
"type": "string", | ||
"default": "no", | ||
"enum": [ | ||
"no", | ||
"yes" | ||
], | ||
"beautifiers": [ | ||
"PHP-CS-Fixer" | ||
], | ||
"key": "allow_risky", | ||
"language": { | ||
"name": "PHP", | ||
"namespace": "php" | ||
}, | ||
"description": "allow risky rules to be applied!" | ||
}, | ||
"phpcbf_path": { | ||
"title": "PHPCBF Path", | ||
"type": "string", | ||
|
@@ -9040,4 +9058,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we will always pass in
allow_risky
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Glavin001 I thought the if there is not passing this option as long as the allow_risky is not changed (not in the configuration file), after changed yes.
I know for sure that if not defined its set to no by default. So the general behaviour would be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I think this is good as is.
The default value should be present, so
no
. So as long asphp-cs-fixer --allow-risky=no
is valid, then we are all good.