FileList#<< bypasses exclusions while FileList#include respects them
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- ruby
- Ambito
- build-system
Direzione di ricerca
Start with FileList#<< and compare its exclusion handling with FileList#include and resolve_exclude. Reproduce the abc.c example and verify that a file excluded before being appended remains absent after resolving; confirm the associated fix and tests pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The << and include methods behave inconsistently with exclusions:
excludetheninclude: exclusion wins (correct)excludethen<<: file gets included anyway (bug)
Example
include_list = FileList.new
include_list.exclude 'abc.c'
include_list.include 'abc.c' # Correctly excluded: []
shovel_list = FileList.new
shovel_list.exclude 'abc.c'
shovel_list << 'abc.c' # Bug: returns ["abc.c"]
shovel_list.resolve # Still returns ["abc.c"] - resolve doesn't fix it
shovel_list.include 'xyz.rb' # Now returns ["xyz.rb"], "abc.c" is finally removed
Fix
Add resolve_exclude to the << method:
def <<(obj)
resolve
@items << Rake.from_pathname(obj)
resolve_exclude # ADD THIS LINE
self
end
I have a PR with fix & tests ready to go if this approach looks good to maintainers
- Lingua principale
- Ruby
- Stelle
- 2.5k
- Fork
- 650
- Merge medio
- 6m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ruby/rake
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
-
Task Options in Command-Line Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
バグ
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Version bump for OpenVox 9 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
voxpupuli/puppet-epel#186 · 1 commento ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) ApertaBug Frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100