question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarification on scan inclusions and exclusions

See original GitHub issue

The MP OpenAPI specification currently defines four configuration keys that deal with including or excluding packages or classes during annotation scanning.

  1. mp.openapi.scan.packages - the list of packages to scan
  2. mp.openapi.scan.classes - the list of classes to scan
  3. mp.openapi.scan.exclude.packages - the list of packages to exclude from scans
  4. mp.openapi.scan.exclude.classes - the list of classes to exclude from scans

I would be helpful to (1) explicitly define the precedence for these configurations (and enforce with TCK tests) and (2) define whether the inclusion of a package or exclusion of a package is recursive. Leaving the detail of package recursion as an implementation decision is a problem for portability.

Relates to smallrye/smallrye-open-api#289

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
MikeEdgarcommented, May 14, 2020

That sounds like a nice idea - and I would even add “or ends with $”. That would give both “starts with” or “ends with” functionality. This can be something we experiment with in SmallRye as well as I don’t think it should break backward compatibility.

0reactions
Azqueltcommented, May 16, 2022

What was the use case for wanting to be able to use regex here?

My initial thought is that regex seems like a bad fit for matching package names:

  1. The . character has a different special meaning in each case
  2. Package names are hierarchical and when you’re selecting packages, it’s generally going to be picking subtrees out of this hierarchy, whereas regex is designed for doing complex matching on all sorts of text

I particularly wouldn’t want support for regex to come at the cost of not allowing a more specific match to take priority over a less specific one. Consider the following rules:

  • include com.example.a
  • exclude com.example.a,b
  • include com.example.a.b.c

I think it’s fairly important that these rules have the following result:

  • com.example.a.MyClass is included
  • com.example.a.b.MyClass is excluded
  • com.example.a.b.c.MyClass is included

Implementations are always free to define some way of supporting the use of regex here but I don’t see any need to add it to the spec unless there are clear use cases for it. When we look at the use cases, we might decide for example that a simpler and more restrictive wildcard syntax is more appropriate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test file inclusions seems to imply source exclusions
I have a project in which I want to scan all C source files and I also have gcov reports, but I only...
Read more >
How to Not Scan Home Networks - Tanium Community
This article describes how to use Tanium Discover to find endpoints on your corporate network that are not using a Tanium agent.
Read more >
Scan exclusion list for Endpoint products - OfficeScan
Identify excluded database and encrypted type files for scanning when installing the OfficeScan (OSCE) client in different Windows environments.
Read more >
Scientific Rationale for the Inclusion and Exclusion Criteria for ...
Purpose—To critically review and evaluate the science behind individual eligibility criteria (indication/inclusion and ...
Read more >
Evaluating Inclusion and Exclusion Criteria in Clinical Trials
Final Thoughts on Inclusion/Exclusion. Criteria ... Draft Guidance for Industry: Clarification of Orphan Designation of Drugs and.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found