Skip to content

Add Behave framework preset - #41

Merged
cleder merged 1 commit into
cleder:developfrom
MathiasPaulenko:add-behave-preset
Jul 29, 2026
Merged

Add Behave framework preset#41
cleder merged 1 commit into
cleder:developfrom
MathiasPaulenko:add-behave-preset

Conversation

@MathiasPaulenko

@MathiasPaulenko MathiasPaulenko commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Hi @cleder,

Following your suggestion in cleder/awesome-python-testing#103, I've added .pre-commit-hooks.yaml files to the three Behave tools and would like to get them wired into pc-init so they can be picked up by awesome-pre-commit-hooks.

This PR adds a behave framework preset with:

  • behave-format (v1.0.2) — formats .feature files
  • behave-lint (v2.4.1) — lints Gherkin/.feature files
  • behave-doctor (v1.2.1) — runs static analysis on Behave BDD suites

All three repos now ship their own .pre-commit-hooks.yaml and are tagged. The preset recommends py since the tools are Python-specific, and I also updated the README to list behave among the supported frameworks.

Let me know if you want the descriptions, ordering, or anything else tweaked.

Cheers,
Mathias

Summary by Sourcery

Add a Behave BDD framework preset and document it among the supported frameworks.

New Features:

  • Introduce a Behave framework preset wiring behave-format, behave-lint, and behave-doctor into the catalog.

Documentation:

  • Document Behave as a supported framework in the README, including its description in the frameworks table.

@semanticdiff-com

semanticdiff-com Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  README.md Unsupported file format
  framework/behave/preset.yaml  0% smaller

@sourcery-ai

sourcery-ai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a new Behave framework preset wired into the catalog, and updates documentation to list Behave among supported frameworks.

Flow diagram for using the new Behave framework preset

flowchart LR
  User["pc-init --framework behave"] --> Catalog
  Catalog["Framework catalog"] --> BehavePreset["framework/behave/preset.yaml"]
  BehavePreset --> BehaveFormat["behave-format hook"]
  BehavePreset --> BehaveLint["behave-lint hook"]
  BehavePreset --> BehaveDoctor["behave-doctor hook"]
Loading

File-Level Changes

Change Details Files
Introduce Behave framework preset configuration for pre-commit.
  • Create a new framework preset file defining Behave as a framework
  • Recommend Python (py) as the language for the Behave preset
  • Configure three Behave-related repositories as pre-commit hook sources
  • Specify hook IDs and human-readable descriptions for format, lint, and static analysis hooks
framework/behave/preset.yaml
Expose Behave as a supported framework in user-facing documentation.
  • Add behave to the documented list of supported frameworks
  • Extend the frameworks reference table with a Behave entry and description
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No application code in the PR — skipped Code Health checks.

See analysis details in CodeScene

Quality Gate Profile: Customizable Safeguards
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@llamapreview llamapreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LlamaPReview — No blocking issues found

1 non-blocking finding retained — highest: Third-party repos owned by first-time contributor referenced via mutable tags.

One non-blocking P2 observation about external third-party hook repos referenced without integrity pinning, classified per adjudication policy as a supply-chain hygiene note rather than a security finding.

Review details and evidence
Priority File Finding Evidence
P2 framework/behave/preset.yaml Third-party repos owned by first-time contributor referenced via mutable tags confirmed

LlamaPReview checks

  • Read the complete PR-head file framework/behave/preset.yaml.

Automated review by LlamaPReview · Free for public open-source projects.

Comment on lines +6 to +9
- repo: https://github.com/MathiasPaulenko/behave-format
rev: v1.0.2
hooks:
- id: behave-format

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 | Confidence: High

The preset references three GitHub repositories owned by the PR author (MathiasPaulenko, author_association=NONE) using mutable Git tags rather than immutable commit hashes. If any of these repos is compromised or its tag force-pushed, every user running pc-init --framework behave then pre-commit run will execute arbitrary code from the attacker-controlled hook. Existing presets may also reference external repos, but this PR is the first to add repos owned by the contributor rather than the repository owner or a widely-recognized organization, crossing a trust boundary without compensating integrity verification. The adjudication policy for third-party mutable artifacts without known compromise evidence sets this as P2 hygiene rather than P1.

Conceptual guidance (not a committable GitHub suggestion):

Consider pinning to an immutable commit hash (e.g., `rev: abc123def456…`) for each repo, or hosting the hook definitions under the organization's control so that code changes require a reviewed PR to this repository.

Evidence: PR-head read of framework/behave/preset.yaml.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.65%. Comparing base (7aae6c5) to head (4298784).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #41   +/-   ##
========================================
  Coverage    99.65%   99.65%           
========================================
  Files           19       19           
  Lines         2621     2621           
========================================
  Hits          2612     2612           
  Misses           9        9           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cleder
cleder merged commit eb052aa into cleder:develop Jul 29, 2026
14 checks passed
@cleder

cleder commented Jul 29, 2026

Copy link
Copy Markdown
Owner

@MathiasPaulenko just released 0.7.0 with your added hooks, also updated the awesome list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants