R210 Add a new file to Git before running checks

On by default

When you create a file, run git add on it and confirm that git ls-files lists it before you run checks.

Reason

Some checkers (the hooks of pre-commit, for example) look only at the files Git tracks. A new file not yet added is invisible to them: a problem in it passes, and such a pass is no evidence (Art. VII §2). Which version of which checker looks at untracked files is hard to keep in mind, and adding every new file first settles it.

Verification

The checks here are the commit hooks and the checks the change touches that run locally before a push (rule 53).

Violated when an agent that created a file runs checks while git ls-files does not yet list it, and cites that result as a pass.

Provisions of the constitution it cites

Relations

Parent
R77 Git
Requires
none
Conflicts with
none

Metadata

ID
210
Revision
2
Kind
rule
Status
trial
Slug
git-add-before-checks
Default level
project
Constitution revisions
>=1
Check
none
Default
on
Uses
Instructions instructions
Original language
English en
Translations
Chinese zh