AdguardTeam / AdguardTeam/DeadDomainsLinter

Export domains with locations

Offen
#30 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @maximtop Auf GitHub ansehen
Priority: P4
Vorherrschende Sprache
JavaScript
Sterne
35
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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:

```json
{
"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:

```js
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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.