File headers: allow pattern matching or multiple allowable headers to support headers that must include a date
See original GitHub issueI agree with @sharwell that it’s a pain to have a file header that includes a date. However, this might not always be avoidable. On one project, the header includes the year when the file was last updated.
It would be helpful if there was a way to allow, say, “Copyright © Flubbersoft, {year}” where year is defined as
\d{4}
(regular expression) or even
{ "2014", "2015" }
(array of permissible values)
I can make my own analyzer for this case if it’s rare, but would be interested to know whether it would be helpful to anyone else too.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Access-Control-Allow-Headers - HTTP - MDN Web Docs
The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers ...
Read more >HTTP/1.1: Header Field Definitions
The Accept-Charset request-header field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of ......
Read more >HTTP headers - MDN Web Docs - Mozilla
HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its...
Read more >Request header field Access-Control-Allow-Headers is not ...
This is a request that uses the HTTP OPTIONS verb and includes several headers, one of which being Access-Control-Request-Headers listing ...
Read more >Authorize with Shared Key (REST API) - Azure Storage
Retrieve all headers for the resource that begin with x-ms- , including the x-ms-date header. Convert each HTTP header name to lowercase. Sort ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sharwell To me, then, it makes sense to extend the existing variable system in the json configuration to allow lists of values, along with a default value for the code fix. That solves the mentioned issue, and maintains the rigidity of the rule.
At this point, the project already supports two specific and particularly practical use cases:
I’ve seen other strategies employed, but they all seem to lose sight of the actual goals. When 95 years rolls around, one of three things will inevitably happen:
My recommendation is to use the inflexibility of this tool as rationale to change the policy as it applies to your project. The company where I work tends to be especially inflexible on this subject, yet for this exact reason we ended up allowed to make this change on the C# projects.