From 40471c9f1529cb0a0087a50029cc48af811c27c8 Mon Sep 17 00:00:00 2001 From: Diana Gergel Date: Mon, 21 May 2018 22:25:26 -0700 Subject: [PATCH 1/2] update to include documentation on running uncrustify --- docs/Development/working-with-git.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Development/working-with-git.md b/docs/Development/working-with-git.md index 35e190352..a74cd959f 100644 --- a/docs/Development/working-with-git.md +++ b/docs/Development/working-with-git.md @@ -128,6 +128,9 @@ To register the deletion of a file: This will bring up a commit log in your default editor. The list of files whose changes will be committed (i.e. were registered via "git add" etc) is shown in the header at the top of the file. If you disagree with this list, exit the editor and do "git add" etc as necessary to correct the list, and then try "git commit" again. If satisfied with the list of changed files, add a description of the set of changes (including a brief description of the problem that motivated the changes). Save and exit. +### 3. Correcting code syntax issues prior to creating a PR +After completing your code commits, you also need to check that your code is compliant with C conventions for indentation and spacing. Please make sure you have `uncrustify` installed, and you will need either version `0.64` or later. Once you have installed `uncrustify`, you should navigate to the `~/tools/code_format` directory in the VIC repo and run `uncrustify`, which you can do by running the script in that directory, `./run_uncrustify.bash`. A simple `git diff --name-only` will list all files that `uncrustify` has updated the syntax for. If any files come up that you have edited, you should commit those syntax edits. + ### Pushing commits to your fork After committing your changes, you should push them to your fork (which has the alias `origin`) stored on GitHub: From 4dc0a82fb5603ddf1cded71571b9c60efb11c869 Mon Sep 17 00:00:00 2001 From: Diana Gergel Date: Tue, 22 May 2018 10:43:38 -0700 Subject: [PATCH 2/2] update with Joe's edits --- docs/Development/working-with-git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Development/working-with-git.md b/docs/Development/working-with-git.md index a74cd959f..fac4b5209 100644 --- a/docs/Development/working-with-git.md +++ b/docs/Development/working-with-git.md @@ -129,7 +129,7 @@ To register the deletion of a file: This will bring up a commit log in your default editor. The list of files whose changes will be committed (i.e. were registered via "git add" etc) is shown in the header at the top of the file. If you disagree with this list, exit the editor and do "git add" etc as necessary to correct the list, and then try "git commit" again. If satisfied with the list of changed files, add a description of the set of changes (including a brief description of the problem that motivated the changes). Save and exit. ### 3. Correcting code syntax issues prior to creating a PR -After completing your code commits, you also need to check that your code is compliant with C conventions for indentation and spacing. Please make sure you have `uncrustify` installed, and you will need either version `0.64` or later. Once you have installed `uncrustify`, you should navigate to the `~/tools/code_format` directory in the VIC repo and run `uncrustify`, which you can do by running the script in that directory, `./run_uncrustify.bash`. A simple `git diff --name-only` will list all files that `uncrustify` has updated the syntax for. If any files come up that you have edited, you should commit those syntax edits. +After completing your code commits, you also need to check that your code is compliant with VIC style conventions for indentation and spacing. Please make sure you have `uncrustify` installed (version `0.64` or later). Once you have installed `uncrustify`, you should navigate to the `...VIC/tools/code_format` directory in the VIC repo and run `uncrustify`, which you can do by running the script in that directory, `./run_uncrustify.bash`. A simple `git diff --name-only` will list all files that `uncrustify` has updated the syntax for. If any files come up that you have edited, you should commit those syntax edits. ### Pushing commits to your fork