oyachai / HearthSim

Generic Hearthstone game simulator
MIT License
316 stars 59 forks source link

Added ability to save decks. #113

Closed Rutnar closed 9 years ago

Rutnar commented 9 years ago

Could someone please help me understand how to reproduce the checkstyle errors in my local environment.

I'm brand new to GitHub and have not used these tools before. I'm running Eclipse Luna on Windows 8.1.

I downloaded the checkstyle plugin and pointed it at the checkstyle.xml file within the project, however it says there are no errors.

oyachai commented 9 years ago

Sorry... I don't know how to do that in Eclipse.

slaymaker1907 commented 9 years ago

In Eclipse, I just messed with the clean operation until I got it to pass the checkstyle. I found that the key changes I had to make from the Eclipse default was to set it to remove trailing whitespace on all lines, format source code, and to correct indentation. I also had to go under Formatter and set it to use 4 spaces instead of tabs.

You can do a build check before submitting a build request by running "gradlew check" from the base directory of your repo similar to when you were building the file structure so that it could be understood by Eclipse.

You can access all of this under Preferences > Java > Code Style and then the appropriate sub menus under there.

I'd also be sure to only clean up the files you change so that Git doesn't think that you've changed files that you haven't made any semantic changes to.

If anybody figures out a way to configure the Eclipse formatter to run in a minimal way so that it only makes the changes necessary to pass the checkstyle (or some other tool that I can run at the end before committing to fix the style) please let me know.

Rutnar commented 9 years ago

Thanks for your help slaymaker, 'gradlew check' was exactly what I was looking for.

oyachai commented 9 years ago

cool, works for me. Thanks!