aRustyDev / aRustyDev/pre-commit-hooks
test(nix): Create test suite for Nix hooks
- Linguagem predominante
- Python
- Estrelas
- 5
- Forks
- 3
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
## Description
Create comprehensive test suite for all Nix pre-commit hooks.
## Requirements
- Create test fixtures (sample Nix files)
- Test success and failure cases for each hook
- Verify error messages are helpful
- Test edge cases and platform compatibility
- Document testing procedures
## Test Structure
```
tests/nix/
├── fixtures/
│ ├── valid-flake.nix
│ ├── invalid-flake.nix
│ ├── darwin-configuration.nix
│ ├── home.nix
│ └── ...
├── test-nix-flake-check.sh
├── test-nix-build-check.sh
├── test-nix-darwin-check.sh
├── test-nix-home-manager-check.sh
├── test-nix-fmt.sh
└── test-nix-lint.sh
```
## Test Cases
- Valid configurations should pass
- Invalid configurations should fail with clear errors
- Missing dependencies should be handled gracefully
- Platform-specific hooks should skip on wrong platforms
- Formatters should produce consistent output
- Linters should catch known anti-patterns
## Dependencies
This issue depends on all hook implementations being complete:
- #15-#20 (all individual hook implementations)
## Documentation
- Update README with testing instructions
- Document how to run individual tests
- Provide examples of expected output
Guia de contribuição
Direção de pesquisa
Comece revisando as implementações de hooks das issues #15-#20 e a estrutura proposta de tests/nix/. Execute cada script de teste individualmente com os fixtures listados e, em seguida, verifique se os casos de sucesso, falha, dependência, plataforma, formatter e linter estão cobertos e se as instruções de teste do README explicam como executá-los.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- shell
- Domínio
- build-system, documentation, testing
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100