Commit Graph

428 Commits

Author SHA1 Message Date
Flake Update Bot
f08e24c734
Automatically update flake.lock to the latest version
haskell-nix 8e42ccd7ed (2023-09-26) -> 28fceff2ef (2024-01-10)
2024-02-01 09:45:06 +01:00
Roman Melnikov
b370667914
Merge pull request #296 from serokell/rvem/chore-update-ruby-version-in-ci
[Chore] Update ruby version used in CI to 3.3
2024-01-31 19:49:57 +01:00
Roman Melnikov
cc40a230ef
[Chore] Pin danger version used in CI 2024-01-31 14:39:36 +01:00
Roman Melnikov
905c24dc1b
[Chore] Update ruby version used in CI to 3.3 2024-01-31 14:29:01 +01:00
Roman Melnikov
59f4fa3391
[Chore] Update "actions/{checkout,upload-artifact}" (#293)
Problem: node16 is now deprecated and github-runner provided by nixpkgs
no longer supports this runtime. However,
"actions/{checkout,upload-artifact}@v3" uses this runtime.

Solution: Update CI pipeline to use "actions/{checkout,upload-artifact}@v4".
2023-12-18 13:16:36 +03:00
Roman Melnikov
e16d31fe85
Merge pull request #292 from serokell/automatic-update
Automatically update flake.lock to the latest version
2023-09-27 09:43:44 +02:00
Flake Update Bot
5e43e087a7 Automatically update flake.lock to the latest version
haskell-nix 50e7b671ca (2023-07-13) -> 8e42ccd7ed (2023-09-26)
2023-09-27 02:00:22 +00:00
Roman Melnikov
48266c76a4
Merge pull request #291 from serokell/automatic-update
Automatically update flake.lock to the latest version
2023-09-26 10:40:41 +02:00
Flake Update Bot
50af83c7c4
Automatically update flake.lock to the latest version
haskell-nix fce554bc6a (2023-03-16) -> 50e7b671ca (2023-07-13)
2023-09-26 10:18:16 +02:00
Roman Melnikov
d816ae7b62
Merge pull request #289 from serokell/rvem/fix-autoreleasing
[Chore] Fix autoreleasing CI job
2023-09-25 13:46:08 +02:00
Roman Melnikov
8e4de7a50a
[Chore] Fix autoreleasing CI job
Problem: After a recent switch to GitHub Actions, job that creates
prerelease suddenly stopped working.

Solution: Switch to the autoreleasing script from serokell.nix
which uses 'gh' instead of 'hub'.
2023-09-22 16:00:31 +02:00
Ivan Gromakovskii
64a338b567
[Chore] Incorporate Scarf (#281)
Problem: we'd like to get some statistics about our users, so that
we know how many people use `xrefcheck` or at least view its README,
from what OS they do it, etc.

Solution:
There is a tool called [Scarf](https://about.scarf.sh/) that
can be used for this purpose.

1. Create a Docker package in Scarf which acts as a proxy,
so that instead of `docker pull serokell/xrefcheck` one will use
`docker pull serokell.docker.scarf.sh/serokell/xrefcheck` and
Scarf will automatically record some (anonymyzed) data.

2. Create a File package in Scarf which acts as another proxy.
It downloads artifacts from GitHub releases, e. g.:
https://serokell.gateway.scarf.sh/xrefcheck/v0.2.2/xrefcheck-x86_64-linux

3. Mention these links in usage instructions.

4. Add a tracking pixel to README to also get statistics about
README views.
2023-07-06 18:34:05 +06:00
Roman Melnikov
7888853694
Merge pull request #287 from serokell/philtaken/replace-buildkite
[Chore] Replace buildkite ci with github-actions
2023-06-26 13:29:36 +02:00
Roman Melnikov
b3c67d495e
[Chore] Bump flake deps
They seem to be quite old and cause
2023-06-21 11:49:32 +02:00
Philipp Herzog
40a2451105
[Chore] Replace buildkite ci with github-actions 2023-06-21 11:49:32 +02:00
Adrián Enríquez
86d9409e88
[Chore] Fix symlinks test on Windows Git Bash (#283) 2023-05-15 12:43:03 +02:00
Savely Krendelhoff
d1f465048e
Merge pull request #278 from serokell/krendelhoff/chore-fix-release-create
[Chore] Update release derivation
2023-02-07 07:23:22 +00:00
Savely Krendelhoff
896dac68e1
[Chore] Update release derivation
Problem: During flakifycation PR `release/default.nix`
was missed.

Solution: Update it to use flake outputs.
2023-02-06 16:21:17 +03:00
Savely Krendelhoff
30b7cc3424
Merge pull request #258 from serokell/krendelhoff/chore-flakify-xrefcheck
[Chore] Flakify xrefcheck
2023-02-03 16:08:43 +00:00
Savely Krendelhoff
979ae7a410
[Chore] Make repo REUSE compiliant
Problem: Since some infra related code was deleted,
one license became unused.

Solution: Remove it.
2023-02-03 13:58:14 +03:00
Savely Krendelhoff
5beb9068c5
[Chore] Update CI
Problem: Infra was flakified, thus CI steps should be updated.

Solution: Update it.
2023-02-03 13:58:13 +03:00
Savely Krendelhoff
015b12126a
[Chore] Flakify xrefcheck
Problem: For historical reasons some Serokell projects use niv to
organize nix-related dependencies. However, the majority of other
projects in our company use nix flakes to organize these dependencies.

Solution: Add flake and provide ci attibutes as flake outputs.
2023-02-03 13:58:12 +03:00
Adrián Enríquez
d50a8e76ba
Merge pull request #262 from serokell/aeqz/#244-symlink-scanner
[#244] Symlink scanner
2023-02-01 13:25:15 +01:00
Adrián Enríquez
9421c42421
[#244] Symlink scanner
Problem: As GitHub and GitLab do not render symlinks as the file they
point to, we are considering to implement a new scanner for symlinks
that verifies them up to some extent.

Solution: A scanner that validates the reference from a symlink has been
implemented in the same style as the markdown scanner.
2023-02-01 13:06:57 +01:00
Adrián Enríquez
4a330231da
Merge pull request #271 from serokell/aeqz/#270-handle-relative-redirects
[#270] Handle relative redirects
2023-01-27 23:06:00 +01:00
Adrián Enríquez
9c2ac77619
[#270] Handle relative redirects
Problem: Currently, Xrefcheck can follow redirects with an absolute
location link, but it cannot handle relative ones.

Solution: After parsing the location link, obtain the corresponding
absolute link by using the original request one.
2023-01-27 22:50:33 +01:00
Adrián Enríquez
25ec1a21d5
Merge pull request #263 from serokell/aeqz/#239-#249-further-filepath-refactor
[#239][#249] Further filepath refactor
2023-01-27 20:10:30 +01:00
Adrián Enríquez
236a006230
[#239][#249] Add path case sensitivity tests
Problem: We currenlty have golden tests for anchor case-sensitivity, but
not for path case-sensitivity.

Solution: A golden test for path case-sensitivity has been added and the
previous one has been renamed.
2023-01-27 19:51:14 +01:00
Adrián Enríquez
f16f95cc40
[#239][#249] Parse quoted git ls-files
Problem: When a file name contains unusual characters, its output line
in git ls-files is quoted and Xrefcheck parses the file name wrong.

Solution: Use the git ls-files -z option to output lines verbatim with
null character line terminators. The file not found message has also
been improved for the case in which its link contains a backslash.
2023-01-27 19:51:14 +01:00
Adrián Enríquez
71589e5f5a
[#239][#249] Simplify progress bar interface
Problem: After changing the progress bar interface to require progress
unit witnesses, some functions related to an anonymous task timestamp
also started to require a progress unit witness, which complicates its
usage unnecessarily.

Solution: Do not require a progress unit witness for getTaskTimestamp.
2023-01-27 19:51:14 +01:00
Adrián Enríquez
eea6118476
[#239][#249] Further filepath refactor
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
2023-01-27 19:51:04 +01:00
Adrián Enríquez
747c884bef
Merge pull request #268 from serokell/aeqz/#237-modify-coloring-options
[#237] Modify coloring options
2023-01-23 18:39:29 +01:00
Adrián Enríquez
29c1ab1d0c
[#237] Modify coloring options
Problem: We noticed that output was not being colorized in GitLab CI due
to the current implemented guesses for whether showing colors or not.

Solution: On the one hand, we extend the current guesses to also enable
coloring by default when the CI env var is set to true. On the other
hand, we also add a new flag, color, which avoids these guesses and
enables colors.
2023-01-23 18:27:12 +01:00
Adrián Enríquez
999518b905
Merge pull request #265 from serokell/aeqz/#235-refactor-progress-bar-interface
[#235] Refactor progress bar interface
2023-01-20 10:58:54 +01:00
Adrián Enríquez
62ad4bf3da
[#235] Refactor progress bar interface
Problem: The current progress bar interface is quite low-level and
error-prone.

Solution: The proposed solution here modifies both the progress bar
internal model and interface by representing progress units by
witnesses. It does not require great changes, but the resulting
interface is more clear and less error-prone.
2023-01-20 10:44:49 +01:00
Adrián Enríquez
ea64357f72
Merge pull request #261 from serokell/aeqz/#242-no-scan-symlinks-as-md
[#242] No scan symlinks as md files
2023-01-19 18:55:27 +01:00
Adrián Enríquez
fef5153d3a
[#242] No scan symlinks as md files
Problem: When the repository contains a symlink to a markdown file, it
is processed by xrefcheck as if it was the same markdown file but in the
symlink's location. This leads to broken references and can be avoided
because neither GitHub nor GitLab try to render symlinks as the file
they point to.

Solution: Consider symlinks as no scannable files. In the future, we
will consider to include a new dedicated scanner for symlinks if it
works.
2023-01-18 13:28:54 +01:00
Adrián Enríquez
c7633755a9
[Chore] Fix changelog typo
Problem: There is a duplicated line in the changelog unreleased section,
which seems to be an accidental copy-paste typo or a bad merge conflict
resolution.

Solution: Delete the aforementioned changelog line.
2023-01-18 13:28:50 +01:00
Adrián Enríquez
5d182c0821
Merge pull request #264 from serokell/aeqz/#25-304-redirect
[#25] Handle 304 redirect
2023-01-18 13:26:36 +01:00
Adrián Enríquez
eccb6d0068
[#25] Handle 304 redirect
Problem: After recent work on Xrefcheck redirect behavior, it remained
to discuss how to handle 304 redirects.

Solution: With the current default configuration, 304 redirects are
considered as valid, which seems appropriate taking into account that
304 responses usually mean that you previously received a successful
response for that same request and there is no need to retransmit the
resource again. We add a test case for this default config and update
the FAQ section.
2023-01-16 18:51:59 +01:00
Adrián Enríquez
20f3d052e0
Merge pull request #250 from serokell/aeqz/#25-redirect-links-config-rules
[#25] Redirect links with configuration rules
2022-12-30 17:37:45 +01:00
Adrián Enríquez
05fe537ae1
[Chore] Simplify regexp usages 2022-12-30 17:12:16 +01:00
Adrián Enríquez
0b4ce991a1
[#25] Redirect links with configuration rules
Problem: We previously changed the default behaviour of Xrefcheck when
following link redirects, but did not provide a way to configure it.

Solution: We are adding a new field in the configuration file to allow
writing a list of redirect rules that will be applied to links that
match them.
2022-12-30 17:11:01 +01:00
YuriRomanowski
a4dc29bf2a
[#217] Retry on response timeout (#234)
Problem: Currently, getting response timeout immediately results in
fail, it's desired to have a possibility to configure retries on
timeouts.

Solution: The new ExternalHttpTimeout error is added, which is treated
in a similar way as the ExternalHttpTooManyRequests error.
A new field is added to the config meaning how many timeouts are
allowed. Default value equals to 1.
2022-12-29 21:59:48 +05:00
Adrián Enríquez
9213017e60
Merge pull request #257 from serokell/aeqz/#254-revise-dump-config-command
[#254] Revise dump-config command
2022-12-29 13:04:06 +01:00
Adrián Enríquez
c9486e7ac6
[Chore] Update comment and error message 2022-12-23 15:17:13 +01:00
Adrián Enríquez
1c44c1c43e
[Style] Sort some package.yaml arrays
Problem: some arrays from the package.yaml file seemed to be almost
alphabetically sorted, but not completely.

Solution: sort the default-extensions and dependencies arrays from the
package.yaml file.
2022-12-23 12:19:42 +01:00
Adrián Enríquez
b30413dd41
[#254] Revise dump-config command
Problem: xrefcheck does not allow to print the config to stdout instead
of writing it to a file. Also, it is easy to overwrite your changes by
mistake by executing the command again.

Solution: provide a --stdout flag to print the config to stdout, and do
not write it to a file unless a --force flag has been included.
2022-12-23 12:19:25 +01:00
Adrián Enríquez
16041d0afd
Merge pull request #230 from serokell/aeqz/#197-canonicalize-filepaths
[#197] Canonicalize filepaths
2022-12-22 17:00:01 +01:00
Adrián Enríquez
978afec64a
[Chore] Allow Style tags 2022-12-22 16:50:39 +01:00