-
Notifications
You must be signed in to change notification settings - Fork 3
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
Warnings about files that weren't added to git yet #200
Comments
We probably should not have a config option for this. This scenario should only happen locally, and the config file is meant to be committed and used by the CI. For this same reason, I don't think it matters much if we change it from an "error" to a "warning". In practice, this means xrefcheck would terminate with the exit code 0 instead of non-0. But the exit code isn't all that useful when the program is being run by a human (which is likely to be the case when xrefcheck is run locally). |
Problem: after 0.2.2 release, xrefcheck cares only about files that were added to Git. That can be confusing for users (see #200) Solution: If a scannable (currently it means markdown) file is not ignored (by git or via config) and not tracked by git, print a warning to stderr while scanning repo. If a link target such file, change error message from "file not exists" to `Link target is not tracked by Git` Suggest user to run "git add" before running xrefcheck in both cases. To do this, I've changed the `RepoInfo` type, so it also contains information about untracked files now.
Problem: after 0.2.2 release, xrefcheck cares only about files that were added to Git. That can be confusing for users (see #200) Solution: If a scannable (currently it means markdown) file is not ignored (by git or via config) and not tracked by git, print a warning to stderr while scanning repo. If a link target such file, change error message from "file not exists" to `Link target is not tracked by Git` Suggest user to run "git add" before running xrefcheck in both cases. To do this, I've changed the `RepoInfo` type, so it also contains information about untracked files now.
Problem: xrefcheck checks only files that are tracked by Git, but sometimes we want to run xrefcheck on files without adding them to Git, e.g. when we want to test some generator of markdown files or when we actively create markdown files during development. Solution: add option to threat files that were neither added to git nor ignored as existing.
Problem: after 0.2.2 release, xrefcheck cares only about files that were added to Git. That can be confusing for users (see #200) Solution: If a scannable (currently it means markdown) file is not ignored (by git or via config) and not tracked by git, print a warning to stderr while scanning repo. If a link target such file, change error message from "file not exists" to `Link target is not tracked by Git` Suggest user to run "git add" before running xrefcheck in both cases. To do this, I've changed the `RepoInfo` type, so it also contains information about untracked files now.
Problem: after 0.2.2 release, xrefcheck cares only about files that were added to Git. That can be confusing for users (see #200) Solution: If a scannable (currently it means markdown) file is not ignored (by git or via config) and not tracked by git, print a warning to stderr while scanning repo. If a link target such file, change error message from "file not exists" to `Link target is not tracked by Git` Suggest user to run "git add" before running xrefcheck in both cases. To do this, I've changed the `RepoInfo` type, so it also contains information about untracked files now.
Problem: xrefcheck checks only files that are tracked by Git, but sometimes we want to run xrefcheck on files without adding them to Git, e.g. when we want to test some generator of markdown files or when we actively create markdown files during development. Solution: add option to treat files that were neither added to git nor ignored as existing.
…les-hints [#200] Warnings about files that weren't added to git yet
Clarification and motivation
After #174, only files that were added to git exist for us. Somebody can make a new file and run xrefcheck before adding it to git (for example I add files right before commiting). List of those files can be obtained, for example, via
git ls-files --others --exclude-standard
. There is two problems for this user:I think this should be our behavior:
IMHO we can also change error to warning in second case, maybe make some CLI/config options (e.g. for simply threating such files as existent)
Acceptance criteria
If a user runs xrefcheck before
git add
, we are not silently skipping new files, and we're not reporting links to them as links to unexisting filesThe text was updated successfully, but these errors were encountered: