Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add todo filtering #1

Merged
merged 4 commits into from
Mar 24, 2023
Merged

feat: add todo filtering #1

merged 4 commits into from
Mar 24, 2023

Conversation

believer
Copy link
Member

By passing a second argument, we can now filter the todos.

$ todos test 1234
TODO  CNX-1234 This should do something else [test/text.js:6:1]

Todos: 1
Files: 8 scanned / 0 OK / 10 filtered

@believer believer self-assigned this Mar 24, 2023
@believer believer added the enhancement New feature or request label Mar 24, 2023
continue;
}

let todo = (line.0, line.1, entry.path().display().to_string());
Copy link
Member Author

Choose a reason for hiding this comment

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

Pass the filename when creating a Todo using .into(). This way, we can use a simple Vec<Todo> to store all the todos.

}

false
branch::alt((tag("TODO"), tag("FIX"), tag("WARNING"), tag("NOTE")))(input)
Copy link
Member Author

Choose a reason for hiding this comment

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

Use nom to handle any special characters.

@believer believer merged commit 3335e61 into main Mar 24, 2023
@believer believer deleted the feature/filter-files branch March 24, 2023 19:13
github-actions bot pushed a commit that referenced this pull request Mar 24, 2023
# [1.1.0](v1.0.0...v1.1.0) (2023-03-24)

### Features

* add todo filtering ([#1](#1)) ([3335e61](3335e61))
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant