Metadata-Version: 2.4
Name: flake8-ascii-validator
Version: 1.0.2
Summary: A Flake8 plugin to validate ASCII characters in Python source code
Author-email: Shiv Kumar <shivkumar0757@gmail.com>
Maintainer-email: Shiv Kumar <shivkumar0757@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/shivkumar0757/flake8-ascii-validator
Project-URL: Repository, https://github.com/shivkumar0757/flake8-ascii-validator
Project-URL: Bug Tracker, https://github.com/shivkumar0757/flake8-ascii-validator/issues
Project-URL: Documentation, https://github.com/shivkumar0757/flake8-ascii-validator#readme
Keywords: flake8,plugin,ascii,validation,code-quality,linting
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: Flake8
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flake8>=3.0.0
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: flake8; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# flake8-ascii-validator

[![Test Status](https://github.com/shivkumar0757/flake8-ascii-validator/workflows/Test/badge.svg)](https://github.com/shivkumar0757/flake8-ascii-validator/actions)
[![PyPI version](https://badge.fury.io/py/flake8-ascii-validator.svg)](https://badge.fury.io/py/flake8-ascii-validator)
[![Python Support](https://img.shields.io/pypi/pyversions/flake8-ascii-validator.svg)](https://pypi.org/project/flake8-ascii-validator/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Flake8 plugin to validate ASCII characters in Python source code.

## Installation

```bash
pip install flake8-ascii-validator
```

## Usage

```bash
flake8 your_file.py
```

Example output:
```bash
example.py:3:5: ASC001 Non-ASCII character 'é' (U+00E9) found in source code
example.py:4:15: ASC002 Non-ASCII character 'ø' (U+00F8) found in string literal
example.py:5:10: ASC003 Non-ASCII character 'ñ' (U+00F1) found in comment
```

## Error Codes

| Code   | Description |
|--------|-------------|
| ASC001 | Non-ASCII character found in source code (variable names, function names, etc.) |
| ASC002 | Non-ASCII character found in string literal |
| ASC003 | Non-ASCII character found in comment |

## Configuration

Ignore specific error codes:
```bash
flake8 --extend-ignore=ASC002
```

Or in your configuration file:
```ini
[flake8]
extend-ignore = ASC002
```

## Examples

Valid ASCII code:
```python
def hello_world():
    message = "Hello, World!"
    return message
```

Invalid non-ASCII code:
```python
def función():  # ASC001: 'ó' in function name
    variável = "café"  # ASC001: 'á' in variable, ASC002: 'é' in string
    # Commentário  # ASC003: 'á' in comment
    return variável
```

## Why Use This Plugin?

- **Team Consistency**: Ensure code works across different environments
- **Legacy Compatibility**: Support systems that don't handle Unicode well
- **Debugging**: ASCII characters are easier to search and debug
- **Code Standards**: Enforce ASCII-only policies in your codebase

## Requirements

- Python 3.7+
- Flake8 3.0.0+

## License

MIT License
