Metadata-Version: 2.4
Name: awesome-lint-extra
Version: 1.0.0
Summary: Custom linter for awesome lists — format validation, alphabetical order, badge checks, and configurable URL approval
Author: GeiserX
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/GeiserX/awesome-lint-extra
Project-URL: Repository, https://github.com/GeiserX/awesome-lint-extra
Project-URL: Issues, https://github.com/GeiserX/awesome-lint-extra/issues
Keywords: awesome-list,linter,lint,markdown,awesome,badges,shields-io
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

  awesome-lint-extra

---

Custom linter for [awesome lists](https://github.com/sindresorhus/awesome). Validates entry format, alphabetical order, badge presence, and URL hosts.

Designed as a complement or replacement for [awesome-lint](https://github.com/sindresorhus/awesome-lint) when your list uses advanced formatting (clickable badges, custom tags, etc.) that the standard linter doesn't support.

## Checks

- **Entry format** — `- [Name](url) ... - Description.`
- **Description style** — starts with capital letter, ends with period, doesn't repeat the project name
- **Alphabetical order** — entries sorted within each section/subsection
- **No duplicate URLs** — each project listed only once
- **URL host validation** — only approved git hosting domains (configurable)
- **Badge presence** — optionally require shields.io badges (stars, language, license, etc.)
- **Custom tag badges** — require colored tag badges (e.g. EU regulation, Spanish institution)
- **ToC consistency** — table of contents matches actual sections

## Usage as GitHub Action

```yaml
name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: GeiserX/awesome-lint-extra@main
        with:
          require_badges: 'true'
          badge_types: '["stars", "last-commit", "language", "license"]'
          check_alphabetical: 'true'
```

## Install from PyPI

```bash
pip install awesome-lint-extra
```

Then run from any directory containing a `README.md`:

```bash
awesome-lint-extra
```

## Usage locally (without installing)

```bash
python3 lint.py
```

## Configuration

Create `.awesomerc.json` in your repo root to configure checks. See [`.awesomerc.example.json`](.awesomerc.example.json) for all options.

### Allowed hosts

By default, the linter accepts URLs from major git hosting platforms:

- github.com, gitlab.com, codeberg.org, gitea.com, sr.ht, bitbucket.org, framagit.org, salsa.debian.org, sourceforge.net, and more

Override with the `allowed_hosts` config option or action input:

```yaml
- uses: GeiserX/awesome-lint-extra@main
  with:
    allowed_hosts: '["github.com", "gitlab.com", "my-gitea.example.com"]'
```

### Requiring badges

Set `require_badges: true` and specify which badge types are required:

```json
{
  "require_badges": true,
  "badge_types": ["stars", "language", "license"]
}
```

Supported badge types: `stars`, `last-commit`, `language`, `license`.

### Custom tag badges

If your list uses colored tag badges (e.g., EU regulation tags), you can require them by specifying a hex color:

```yaml
- uses: GeiserX/awesome-lint-extra@main
  with:
    require_custom_tags: '003399'
```

Or in `.awesomerc.json`:

```json
{
  "require_custom_tags": "003399"
}
```

This checks that each entry has at least one shields.io badge with the specified color.

## License

[GPL-3.0](LICENSE)
