Skip to content

No longer raise a RuntimeError if an input file was not formatted wel… - #6

Open
thinkingerrol wants to merge 6 commits into
funkwerk:masterfrom
thinkingerrol:master
Open

thinkingerrol wants to merge 6 commits into
funkwerk:masterfrom
thinkingerrol:master

Conversation

@thinkingerrol

Copy link
Copy Markdown

…l. It is quite normal to accept such input. Also log 'Fixed it for you' in case a file has been fixed by gherkin_format.

…l. It is quite normal to accept such input. Also log 'Fixed it for you' in case a file has been fixed by gherkin_format.
@thinkingerrol

Copy link
Copy Markdown
Author

This should fix #5

@lindt

lindt commented Jun 27, 2018

Copy link
Copy Markdown
Member

How to run this script in CI? It is a valid requirement to see if there are unformatted files. How to do this without the exit code?

@thinkingerrol

Copy link
Copy Markdown
Author

Thanks, I see what you mean, and now made sure the error code 1 will be returned to be usable in CI environments. Now the issue #5 should be fixed without bad side-effects, if you merge this PR. Cheers!

@duselbaer

Copy link
Copy Markdown

Wie merged man das jetzt?

Comment thread lib/gherkin_format.rb Outdated
Comment thread lib/gherkin_format.rb Outdated
File.write(file, output) if options.key? :replace
if options.key? :replace
File.write(file, output)
puts "File #{file} was not formatted well. Fixed it for you!"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we remove the you?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@thinkingerrol

Copy link
Copy Markdown
Author

ping! fixed your review findings; now also multiple files can be fixed by gherkin_format before exiting with status 1.

@thinkingerrol

Copy link
Copy Markdown
Author

ping

1 similar comment
@thinkingerrol

Copy link
Copy Markdown
Author

ping

@thinkingerrol

Copy link
Copy Markdown
Author

piing

@thinkingerrol

Copy link
Copy Markdown
Author

pong

@thinkingerrol

Copy link
Copy Markdown
Author

ping

@thinkingerrol

Copy link
Copy Markdown
Author

ping, mate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants