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

Ignore check of unmatched patterns #373

Open
Shingaz opened this issue Oct 18, 2024 · 1 comment · May be fixed by #408
Open

Ignore check of unmatched patterns #373

Shingaz opened this issue Oct 18, 2024 · 1 comment · May be fixed by #408
Labels
enhancement New feature or request

Comments

@Shingaz
Copy link

Shingaz commented Oct 18, 2024

Is your feature request related to a problem? Please describe.

It is very difficult to use the ui5linter in conjuction with lint-staged. To avoid to lint the whole project before commiting, we use lint-staged lint only files staged for commit.

The lint-staged configuration is this one:

const ui5lint = (filenames) => `ui5lint ${filenames.join(" ")}`;

export default {
  "webapp/**/*": (stagedFiles) => ui5lint(stagedFiles),
};

Depending on what is staged for commit, some files can be included in the resulting command but ui5lint is not able to process them. For example:

ui5lint webapp/test/integration/mock/metadata.xml webapp/view/Main.view.xml 

In this case, as webapp/test/integration/mock/metadata.xml cannot be processed by ui5lint, the whole command fails.

Describe the solution you'd like

Have a parameter to ignore files that cannot be processed. Similarly to Prettier --ignore-unknown for example.

Describe alternatives you've considered

Monkey patch the ui5-linter library.

Additional context

Add any other context or screenshots about the feature request here.

@Shingaz Shingaz added the enhancement New feature or request label Oct 18, 2024
@flovogt flovogt self-assigned this Nov 7, 2024
@flovogt
Copy link
Member

flovogt commented Nov 7, 2024

@Shingaz Thanks a lot for opening this enhancement request. Great Idea! We will implement this feature with backlog item CPOUI5FOUNDATION-955

@flovogt flovogt removed their assignment Nov 7, 2024
@d3xter666 d3xter666 linked a pull request Nov 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants