Skip to content

Conversation

@markphelps
Copy link
Contributor

Summary

Implements automatic problem matcher support for flipt validate commands, providing inline GitHub annotations on PR files when validation errors occur.

Changes

  • Problem Matcher Registration: Automatically registers .github/flipt-problem-matcher.json when validate commands are detected
  • JSON Format Auto-append: Automatically adds --format json to validate commands for structured error parsing
  • GitHub Annotations: Creates inline annotations on PR files showing validation errors with precise line numbers
  • Backward Compatibility: Preserves existing behavior when users specify their own format flags
  • Comprehensive Documentation: Updated README.md and CLAUDE.md with examples and implementation details

Key Features

  • Automatic activation: No user configuration required - just run flipt validate as usual
  • Precise annotations: Shows exactly which file and line has validation errors
  • Smart format handling: Only auto-appends --format json if user hasn't specified format flags
  • Works with both v1 and v2: Compatible with all Flipt versions

Example Output

When validation errors occur, users will see annotations like:

flags.1.key: conflicting values null and string (mismatched types null and string)
File: invalid-features.yaml, Line: 8

Fixes #27

Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
- Add automatic problem matcher registration for validate commands
- Auto-append --format json to validate commands for structured parsing
- Create GitHub annotations on PR files for validation errors
- Add comprehensive documentation and examples
- Maintain backward compatibility with existing workflows

Fixes #27

Signed-off-by: Mark Phelps <[email protected]>
Base automatically changed from v2-support to main August 12, 2025 13:11
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