Skip to content
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

running test makes the repository dirty #903

Closed
ssbarnea opened this issue Jan 13, 2020 · 2 comments · Fixed by #1712
Closed

running test makes the repository dirty #903

ssbarnea opened this issue Jan 13, 2020 · 2 comments · Fixed by #1712

Comments

@ssbarnea
Copy link
Contributor

By following the testing instructions for testing the code you will end-up with modified tracked git files.

Running tests on any software project should never put the repository into a dirty state.

$ git status                                                                                                                                                              On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   schemas/json/ninjs-1.0.json
	modified:   schemas/json/ninjs-1.1.json
	modified:   schemas/json/ninjs-1.2.json
	modified:   schemas/json/resume.json

Many projects are even adding an extra step on CI to test that execution does not produce leftovers, either tracked or not. Any byproduct of the testing should be included in .gitignore.

@GerryFerdinandus
Copy link
Contributor

On my macOS after test run, there are 5 'dirty' files.

git status
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: src/package-lock.json
modified: src/schemas/json/ninjs-1.0.json
modified: src/schemas/json/ninjs-1.1.json
modified: src/schemas/json/ninjs-1.2.json
modified: src/schemas/json/resume.json

Put these 5 files in .gitignore would be nice.

@opub
Copy link
Contributor

opub commented Sep 23, 2020

It looks like most of the changes are CRLF to LF which I assume are side effects of running the tests on a non-Windows machine?

warning: CRLF will be replaced by LF in src/schemas/json/ninjs-1.0.json.
The file will have its original line endings in your working directory
warning: CRLF will be replaced by LF in src/schemas/json/ninjs-1.1.json.
The file will have its original line endings in your working directory
warning: CRLF will be replaced by LF in src/schemas/json/ninjs-1.2.json.
The file will have its original line endings in your working directory
warning: CRLF will be replaced by LF in src/schemas/json/ninjs-1.3.json.
The file will have its original line endings in your working directory
diff --git a/src/schemas/json/resume.json b/src/schemas/json/resume.json
index 5e6b6c0..f271353 100644
--- a/src/schemas/json/resume.json
+++ b/src/schemas/json/resume.json
@@ -219,7 +219,7 @@
           "endDate": {
             "$ref": "#/definitions/iso8601"
           },
-          "gpa": {
+          "score": {
             "type": "string",
             "description": "grade point average, e.g. 3.67/4.0"
           },

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 a pull request may close this issue.

3 participants