Merging changes after introduction of formatting guidelines

Manuel Benz edited this page Apr 20, 2018 · 13 revisions

If you forked and modified Soot before the introduction of our coding-style guidelines, you might want to take this in to account before merging:

Git should be able to automatically merge all formatting changes to files that weren't touched in your version of Soot's codebase. Also, files with small changes should be easy to merge. However, if you made huge changes to some files, it might make more sense to throw away the remote files, keep your own versions and apply the auto formatting to your files afterward.

Note: <remote> denotes the git remote pointing to this repository. If you just cloned our repository, <remote> will most likely be origin.

  1. Pull the commit previous to our formatting commit: git pull <remote> 5c8bfba2594942e89be978167febf533177879bd
  2. Merge your code with the remote code using a merge tool. To omit merging the auto generated files run
git checkout --theirs src/main/generated/*
git add src/main/generated/*
  1. When successfully merged, commit your changes
  2. Pull our formatting changes git pull <remote> ae1cf8c4126771873414a127b89e59d0ba4c0d57. Then run
git checkout --ours src/main/java/*
git add src/main/java/*

to keep your changes in source files that cannot be automatically merged and throw away our formatting changes.

  1. Merge all other conficts and run mvn validate to see which of your changes violate our guidelines
  2. Apply formatting as stated in our formatting tutorials (Eclipse, IntelliJ Idea)
  3. Validate the state of your revision with mvn validate and fix remaining styling issues
  4. Commit your changes
  5. Pull and merge changes after the formatting commit git pull <remote> develop
  6. Run mvn test -Dcheckstyle.failOnViolation=true to check if everything works (This wil also recreate the generated files for your configuration)

Table of Contents

Also check out Soot's webpage NOTE: If you find any bugs in those tutorials (or other parts of Soot) please help us out by reporting them in our issue tracker.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.