DeadDomainsLinter
DeadDomainsLinter copied to clipboard
Export domains with locations
Currently, only the domain set can be exported. I suggest adding an option that exports all occurrences of the domain. We can use a JSON data structure something like this:
{
"example.com": [
{
"file": "sections/ads.txt",
"line": 1,
"startColumn": 10,
"endColumn": 21,
},
{
"file": "sections/ads.txt",
"line": 2,
"startColumn": 110,
"endColumn": 121,
}
...
],
"example.org": [...]
}
This is useful because in this case CI can display the report specifically for the given file and location, see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-a-warning-message
or programmatically:
const core = require('@actions/core');
core.warning('Possibly dead domain: example.com', {
file: 'sections/ads.txt',
startLine: 1,
startColumn: 10,
endColumn: 21,
});
I created a simple workflow for dead domains linter, I think this would be useful there, for example: https://github.com/hufilter/hufilter/blob/master/.github/workflows/dead-domains-check.yml