Commit Graph

270 Commits

Author SHA1 Message Date
martoon
63c09a0e55
Prepare 0.1.3 release
Problem: the feature with ignoring links has been added, and it is
necessary in many places.

Solution: make a release.
2021-03-17 15:06:19 +03:00
Zhenya Vinogradov
6cf3b26d11
Merge pull request #59 from serokell/zhenya/ops1178-trailing-whitespace
Add trailing whitespace check to CI
2021-03-17 14:00:30 +03:00
Zhenya Vinogradov
69f45d769a
Remove trailing whitespace everywhere 2021-03-11 14:47:34 +03:00
Zhenya Vinogradov
a0b3f9a5ad
Add trailing whitespace check to CI
The check is imported from serokell.nix. Nix files have been refactored,
to make 'cleanGit' funcion available in ci.nix
2021-03-11 14:47:34 +03:00
Zhenya Vinogradov
4eca82663a
Create a file for all nix expressions used by CI
Makes it easy to add new nix-based checks to CI
2021-03-11 14:04:20 +03:00
Konstantin Ivanov
06f504f868
Merge pull request #58 from serokell/martoon/bump-lts-17
Bump to lts-17
2021-03-10 15:43:44 +03:00
Zhenya Vinogradov
83effbb6fd
CI: bump nixpkgs and haskell.nix 2021-03-10 12:08:29 +03:00
Zhenya Vinogradov
a63d972f87
CI: bump niv 2021-03-10 12:08:29 +03:00
martoon
f17dd1b631
Bump to lts-17.3
Problem: someday we have to switch to the recent lts.

Solution: let's do this now.

Also update `with-utf8` package version.
2021-03-10 12:08:29 +03:00
martoon
d0ca7d7771
[#35] Stop using aeson-options
`aeson-options` package is going to be deprecated. Moreover, it does not
work in the recent lts.

Solution: use `aeson-casing` package instead.
2021-03-10 12:08:29 +03:00
Alyona Antonova
5b758b7171
Merge pull request #53 from serokell/alyoanton9/#135-ignore-global-links
Ignoring global links in markdown files
2021-03-09 22:21:11 +03:00
Alyona Antonova
e888ef5813 [#135] Add information about external links ignoring to the README.md
Problem: Added ignoring features need to
be described somewhere to be visible
for users.

Solution: Add such a description to the
`Usage` part of `README.md`
2021-03-09 22:18:07 +03:00
Alyona Antonova
bc9e497efb [#135] Add tests and markdowns to check ignoring regex performance
Problem: There are no tests checking ignoring
regex performance.

Solution: Add test checking that broken links
matched by regexs are not verified and
test checking that not matched broken links
are verified as links with error.
2021-03-09 22:18:07 +03:00
Alyona Antonova
e22bb18c55 [#135] Add "ignoring" changes to CHANGES.md
Problem: Changes connected with adding `ignoreRefs`
and ignorong modes are not stated in `CHANGES.md`

Solution: Add information about such changes.
2021-03-09 22:18:07 +03:00
Alyona Antonova
41c6dbb3af [#135] Add tests and markdowns to check ignoring modes performance
Problem: There are no tests checking the performance
of different ignoring modes.

Solution: Add such tests to `Xrefcheck.Test.IgnoringSpec`.
Also add markdowns to test on real files.
2021-03-09 22:18:07 +03:00
Alyona Antonova
638167be39 [#135] Add info about ignoring modes to help message
Problem: There is no mention of ignoring modes in
help message.

Solution: Add a footer with a description of
each ignoring mode to `getCommand` function
of `Xrefcheck.CLI`.
2021-03-09 22:18:07 +03:00
Alyona Antonova
ecff1dc342 [#135] Add support of right in-place annotations
Problem: It can be convenient not only specifying
exclusions in the config, but also annotating
the excluded thing right in-place. It is about
adding comment before the link or the paragraph
or even the whole file to ignore this item.

Solution: Support annotation as html comment in
a "<!-- xrefcheck: ignore mode -->" format, where
mode is "link" or "paragraph" or "file". Modify
`nodeExtractInfo` from `Xrefcheck.Scanners.Markdown`
just to skip a node in AST while parsing. Take into
account that "ignore file" can only be at the top
of the file or right after the license. In markdown
terms: either the first node must be HTML_BLOCK
with "<!-- xrefcheck: ignore file -->" content
or the first is HTML_BLOCK comment (smth
between "<!--" and "-->") and the second is
HTML_BLOCK with "ignore file" content.
Also take into account that "ignore link" must be
followed by a link. Strictly speaking, there is
either LINK after "ignore link" or TEXT and LINK
(if there is some text before the link).
2021-03-09 22:18:07 +03:00
Alyona Antonova
40640124db [#135] Add vcIgnoreRefs as regexs to Xrefcheck.Config
Problem: External links must be ignored sometimes
and not be checked for validity.

Solution: Add `vcIgnoreRefs` to `Config` that is a list
of regexs using `regex-tdfa`. Each regex define a link
we want to ignore while validating. Change
`checkExternalResource` to support matching the regex.
2021-03-09 16:42:29 +03:00
Konstantin Ivanov
64fc9e03ae
Merge pull request #52 from serokell/martoon/update-other-solutions
Update README section with comparison
2021-01-08 16:42:08 +04:00
martoon
94836bc054
Update README section with comparison
Problem: there seems to be another popular tool for HTMLs verification
called `linkcheck`, it is stated to be way better than
`broken-link-checker`.

Solution: replace `broken-link-checker` mention with `linkcheck`, say
that there are other solutions to this problem.

Also make the paragraph a bit more clear in general.
2021-01-08 15:21:25 +03:00
Zhenya Vinogradov
46f71b3559
Merge pull request #51 from serokell/zhenya/ops1023-ci-pin-fix
CI: fix pinning hackage and stackage, update hackage and stackage indexes
2020-09-28 11:56:13 +03:00
Zhenya Vinogradov
140798b507
CI: bump hackage and stackage 2020-09-28 11:51:08 +03:00
Zhenya Vinogradov
353076ccb4
CI: bump niv 2020-09-28 11:51:08 +03:00
Zhenya Vinogradov
2d637cd771
CI: fix pinning hackage and stackage 2020-09-28 11:51:01 +03:00
Konstantin Ivanov
9432a9b087
Merge pull request #50 from serokell/martoon/mention-github-action
[#40] Mention GitHub action in `README`
2020-09-22 11:53:48 +03:00
martoon
07757f2754
Mention our GitHub action in README
Problem: @gromakovsky has recently implemented a github action which
adds xrefcheck pass to CI and it resides in a separate repository, we
want it to be visible in our documentation here.

Solution: mention it in `Usage` section.
2020-09-17 14:03:38 +03:00
Ivan Gromakovskii
5ba3605ac7
Merge pull request #48 from serokell/zhenya/ops1023-update-haskell-nix
[OPS-1023] CI: update dependencies, pin hackage and stackage indexes independently
2020-08-11 14:24:28 +03:00
Zhenya Vinogradov
245966c0f8
[OPS-1023] Add '--insecure-policy' to skopeo invocation
Without it skopeo fails because it requires configured policy file to
verify downloaded images, but we don't need a policy file because we
only use skopeo for uploading
2020-08-10 15:14:45 +03:00
Zhenya Vinogradov
b07ff76fa5
[OPS-1023] CI: remove 'configureFlags' from build configuration
This option is not need anymore because new haskell.nix version seems to
supply the libraries automatically
2020-08-10 15:12:21 +03:00
Zhenya Vinogradov
914f967caa
[OPS-1023] CI: pin hackage.nix and stackage.nix independently 2020-08-10 15:12:21 +03:00
Zhenya Vinogradov
d74f93c00b
[OPS-1023] CI: update dependencies 2020-08-10 15:04:46 +03:00
Alexander Bantyev
ab8ba70abc
Merge pull request #29 from serokell/balsoft/windows-build
Add a windows build
2020-07-03 12:14:35 +03:00
Alexander Bantyev
76b7ae101b
Add a windows build 2020-07-03 12:08:22 +03:00
Ivan Gromakovskii
df59d2c461
Merge pull request #46 from serokell/gromak/base-upper-bound
Add an upper bound on base
2020-06-30 00:48:35 +03:00
Ivan Gromakovskii
c56a9eb0bc
Add an upper bound on base
Problem: `stack upload` does not like that `base` does not have an
upper bound, it reports an error while checking the package.

Solution: add an upper bound on `base` to prevent people from using a
broken version of this package in case of breaking changes in `base`.
Since we build with stack, our current default is 4.13 (deduced from
the resolver). However, 4.14 does not seem to have any breaking changes
https://hackage.haskell.org/package/base-4.14.0.0/changelog
so it should be fine to permit it as well, and that's what we are doing.
2020-06-29 23:58:08 +03:00
Alexander Bantyev
7edf7a799d
Merge pull request #45 from serokell/docker
Add ability to build with docker
2020-06-29 20:58:49 +03:00
Alexander Bantyev
cdf02b8ea1
Fix copyright info
Co-authored-by: Ivan Gromakovskii <gie1994@gmail.com>
2020-06-29 20:51:53 +03:00
Alexander Bantyev
3dbff2ca93
Add ways to get xrefcheck to readme 2020-06-29 17:49:30 +03:00
Alexander Bantyev
a16fbbc57d
Add ability to build with docker 2020-06-29 17:49:23 +03:00
Konstantin Ivanov
53344d09ce
Merge pull request #44 from serokell/martoon/smart-progress-option
Disable progress bar in CI automatically
2020-06-27 22:47:19 +03:00
martoon
0d6e61905f
Make a release 2020-06-26 22:32:03 +03:00
martoon
967da232d3
Disable progress bar in CI automatically
Problem: we have two major use cases:

1. Using xrefcheck in CI, in this case it is annoying for devops to
always pass mostly always reasonable `--no-progress` option.
2. Using it locally, here we want progress bar to be enabled by default
so that user could run `xrefcheck` without any options most of the time.

Solution:

Detect whether are we running in CI and use the respective default for
whether progress bar should be displayed.

Detecting whether we are within CI is possible using `CI` env variable,
at least Github actions, Gitlab CI and Buildkite pass this env.

`--no-progress` option still can be passed if user wants to suppress
progress bar in local run. The opposite `--progress` seems to also make
sense, because in case if high timeouts are set, user probably wants to
track progress somehow to make sure that CI didn't hang. So we add the
latter, and these two options can be used to override the default
behaviour defined by `CI` env var.
2020-06-26 22:32:03 +03:00
Alexander Bantyev
be03fa9c76
Merge pull request #41 from serokell/fix-release
Fix release
2020-06-26 21:32:48 +03:00
Alexander Bantyev
771d0abe42
Adapt release/default.nix to work with new release-binary script 2020-06-26 21:19:38 +03:00
Ivan Gromakovskii
72b0cbd98e
Merge pull request #37 from serokell/gromak/#36-new-resolver
[#36] Switch to lts-15.13
2020-06-10 19:12:42 +03:00
Alexander Bantyev
4f94e4a8a8
Add numa to static libraries 2020-06-09 13:15:09 +03:00
Zhenya Vinogradov
7d0ac7cc31
Update haskell.nix invocation
haskell.nix interface changed
2020-06-09 13:15:08 +03:00
Ivan Gromakovskii
086df1c03f
Update haskell.nix
So that we can build with a newer Stackage resolver on CI.
2020-06-09 13:15:07 +03:00
Ivan Gromakovskii
59f188c496
[#36] Switch to lts-15.13
Problem: LTS-14.16 that we currently using and a bit old.
And its GHC is old as well.

Solution: update the resolver, make some changes that were necessary.
They are pretty trivial. The only essential breaking change is the
removal of `parseUrl` from `req`.
2020-05-23 18:41:11 +03:00
Ivan Gromakovskii
2a29c79123
Merge pull request #34 from serokell/gromak/drop-autoexporter
Drop autoexporter usage
2020-05-19 21:21:44 +03:00