[build-system]
requires = ["setuptools>=69", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "gh-vuln-scan"
version = "0.1.0"
description = "GitHub Dependabot/Advisory vulnerability gate for PRs (OOP, multi-ecosystem)"
requires-python = ">=3.13"
dependencies = [
  "requests>=2.32.0",
  "rich>=13.7.0",
  "PyGithub>=2.4.0",
  "prettytable>=3.11.0",
  "packaging>=24.2",
  "python-dotenv>=1.0.1",
  "PyYAML>=6.0.3",
  "toml>=0.10.2",
  "pyarn>=0.2.0",
  "semantic_version>=2.10.0",
  "defusedxml>=0.7.1",
]

[project.optional-dependencies]
dev = [
  "pytest>=8.0.0",
  "pytest-cov>=5.0.0",
  "ruff>=0.6.0",
  "black>=24.8.0",
  "mypy>=1.11.0",
  "types-requests>=2.23",
  "types-toml>=0.10",
  "types-PyYAML>=6.0"
]

[project.scripts]
vuln-scan = "vuln_scan.cli:main"

[tool.setuptools]
package-dir = {"" = "src"}


# -------------------------
# Ruff (Linting + Imports)
# -------------------------
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src"]

[tool.ruff.lint]
select = [
  "E",   # pycodestyle errors
  "F",   # pyflakes
  "I",   # import sorting (isort)
  "UP",  # pyupgrade
  "B",   # bugbear
  "SIM", # simplifications
]

ignore = [
  "E501"
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

# -------------------------
# Black (Formatting)
# -------------------------
[tool.black]
line-length = 100
target-version = ["py313"]

# -------------------------
# Mypy (Type Checking)
# -------------------------
[tool.mypy]
python_version = "3.13"
strict = true
warn_unused_configs = true
ignore_missing_imports = true

# -------------------------
# Pytest
# -------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "."]
addopts = "--cov=src --cov-report=term-missing"
