Comments (4)
Thanks for the consideration.
If I get some time, will try to look at submitting a patch
from pr-metrics.
Thanks @cjprecord for using PR Metrics and for filing your suggestion.
This is something that has been considered in the past, but to reduce the complexity – especially given the possibility of interference between multiple sets of globs and the need to define clear precedence rules – it was decided against adding this.
The other rationale is that it encourages the proper naming of code – i.e., that you don't put test in product code for instance.
To help determine whether we proceed with changing this and the proper level of prioritisation, I'd like to understand:
- Why you have
Test
in the names of non-test files? If I sawSystemTest.cs
, I would assume it was testing the system and therefore was test code. - If this is some form of testing that you don't want included, would it make sense to exclude this using the excluded files functionality?
from pr-metrics.
Hello,
Use of an optional regular expression string would work for this as well and probably be less complicated to existing functionality.
Depending on industry or codebase use there are a lot of cases where Test may appear in a file name that is not a test case. A big one for us is we have a lot of code that is used for mechanical or electrical control systems. Lots of components are used for 'self' tests, diagnostics, or literally running tests on the target systems or other diagnostic purposes and use of Test in the class/file names is very sensible and common.
Where these 'tests' are not tests for the code base being developed but tests that are performed on a target system, purpose of report on 'test' code should be for the code quality of the code being developed and not inflated by the 'tests' that the production code runs on other systems.
An exclude pattern could possibly work but would be more complicated to use in the projects we have. Typically we use a namespace / folder path structure to organize software tests code from production code, common example pattern is like this where all software test code is under an AutomatedTests folder
ModuleAlpha
AutomatedTests
ModuleAUT
ModuleBUT
ModuleA
ModuleB
from pr-metrics.
Thanks @cjprecord for the justification. I now believe it's viable for PR Metrics to support something like that.
The bad news is that we won't be able to prioritise this work anytime soon, but I am happy to support you implementing it if it is something you would be willing to take on.
As for the regular expression/glob possibilities, I really favour using a glob to keep the existing checks aligned. I believe switching between the two for different parameters will make the extension more difficult to consume.
from pr-metrics.
Related Issues (20)
- TypeError – stack: "TypeError: Cannot read property 'length' of null HOT 2
- Azure Devops token error HOT 7
- Files are wrongfully counted as test files HOT 1
- The message for a pull request that is too large shows the wrong number HOT 3
- Allow for the large pull request message to be optional HOT 1
- Allow selecting the compare branch HOT 10
- TODO: Remove System.AccessToken support after a transition period has elapsed
- Request line change info from Azure DevOps and GitHub HOT 2
- Request for ignoring white spaces while computing diff count. HOT 4
- Could not access sufficient Git history HOT 5
- Request: Make PR comment table horizontal vs vertical HOT 1
- Can't get PR Metrics to work on Azure Devops Server (not cloud) HOT 10
- Cannot read property 'forEach' of null - Azure DevOps error HOT 2
- Option to skip PR title changes HOT 4
- file-matching-patterns only respects first match pattern HOT 2
- Show dashes (-) instead of 0 in the table HOT 1
- Workflow completes with success despite expired token HOT 2
- Secret PAT Token does not work on Azure DevOps OnPremise HOT 5
- PR validation time HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pr-metrics.