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

Fix all remark warnings #3261

Merged
merged 5 commits into from
May 31, 2021
Merged

Fix all remark warnings #3261

merged 5 commits into from
May 31, 2021

Conversation

IRDonch
Copy link

@IRDonch IRDonch commented May 31, 2021

Motivation and context

Currently, the remark workflow only runs remark on changed files, which means that it's possible for files that have already existed in the repository by the time the workflow was added to contain remark warnings. And by "possible" I mean that these warnings do exist, and there is a lot of them.

This PR fixes all of these warnings, and changes the workflow so that remark is run on all files, making it impossible for this situation to reoccur. It also ensures that remark dependencies are installed deterministically, and updates the remark configuration to avoid false positives. See the commit messages for details.

How has this been tested?

N/A - no code changes (except for the workflow)

Checklist

  • I submit my changes into the develop branch
  • [ ] I have added description of my changes into CHANGELOG file there aren't any user-visible changes
  • I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes no changes in the code
  • [ ] I have linked related issues (read github docs)
  • [ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
    cvat-core, cvat-data and cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • [ ] I have updated the license header for each file (see an example below) no headers in Markdown files
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

Roman Donchenko added 5 commits May 31, 2021 20:31
This enables the transitive dependencies to be pinned, just like for all
other packages.
These are needed to correctly parse certain constructs in Markdown files
(such as tables and YAML frontmatter), and without them, remark produces
invalid warnings on some files.
The previous versions reference the old version of the
`remark-lint-table-cell-padding` plugin, which doesn't work correctly with
the current version of `remark-parse` (and thus produces spurious warnings).
This way, if a PR updates the remark configuration and that causes new errors
to appear, those errors will show up in that PR, instead of the (unrelated) PR
that next updates the affected files.

There is no runtime cost to this, because remark takes approximately 1 second
to check all files.
@nmanovic nmanovic merged commit 2597546 into cvat-ai:develop May 31, 2021
@IRDonch IRDonch deleted the remark-fixes branch June 1, 2021 09:42
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 this pull request may close these issues.

2 participants