Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Bug Report
description: Create a report to help improve zParse
title: "bug: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

- type: input
id: version
attributes:
label: Version
description: What version of zParse are you using?
placeholder: "1.0.0"
validations:
required: true

- type: dropdown
id: platform
attributes:
label: Platform
description: What platform are you using?
options:
- Linux
- macOS
- Windows
- Other (specify in description)
validations:
required: true

- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: "When I try to parse X, Y happens instead of Z..."
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: To Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Create a file with content '...'
2. Run command '...'
3. See error
validations:
required: true

- type: textarea
id: example
attributes:
label: Example Code/Input
description: Please provide a minimal example that demonstrates the issue
render: rust
placeholder: |
use zparse::parse_file;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let value = parse_file("config.json")?;
println!("{}", value);
Ok(())
}
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual behavior
description: What actually happened?
placeholder: Include any error messages, stack traces, or unexpected output.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the problem here
validations:
required: false

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our Code of Conduct
options:
- label: I agree to follow this project's Code of Conduct
required: true
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Feature Request
description: Suggest an idea for zParse
title: "feat: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a new feature!

- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: example
attributes:
label: Example Implementation
description: If you have an idea of how this might be implemented, share it here
render: rust
placeholder: |
// Example API usage or implementation
use zparse::SomeNewFeature;

fn example() {
// Your example code here
}
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false

- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- Nice to have
- Important
- Critical
validations:
required: true

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our Code of Conduct
options:
- label: I agree to follow this project's Code of Conduct
required: true
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Type of Change

<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description

<!-- Describe your changes in detail -->

## Context

<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->

## How did you test it?

<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

## Checklist

<!-- Put an `x` in the boxes that apply -->

- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "cargo"
# Look for `Cargo.toml` and `Cargo.lock` files in the `root` directory
directory: "/"
# Check the Cargo for updates weekly
schedule:
interval: "weekly"
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI-push

on:
push:
branches:
- main
merge_group:
types:
- checks_requested
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: short

jobs:
formatting:
name: cargo-fmt
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt

- name: Check formatting
shell: bash
run: cargo +nightly fmt --all --check

typos:
name: spell-check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Spell check
uses: crate-ci/typos@master

test:
name: test-${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30

env:
RUSTFLAGS: "-D warnings"

strategy:
fail-fast: true
matrix:
runner:
- ubuntu-latest
- macos-latest
- windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install mold linker
uses: rui314/setup-mold@v1
if: ${{ runner.os == 'Linux' }}
with:
make-default: true

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable 2 weeks ago
components: clippy

- uses: Swatinem/[email protected]
with:
save-if: ${{ github.event_name == 'push' }}

# Run only zparse package tests, exclude fuzz package completely
- name: Run tests
run: cargo test --all-features --all-targets

- name: Run tests (release)
run: cargo test --release --all-features --all-targets

- name: Run Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ pub mod detector;
pub mod report;
pub mod scanner;
pub mod utils;

Loading