Skip to content

Commit

Permalink
Update gif and find todos
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Apr 13, 2023
1 parent c56c7ce commit ab50488
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,40 @@ jobs:
with:
command: check

todos:
name: todos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-
- name: cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: cargo-registry-check-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-check-
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: ./lint_string.sh "TODO "
- run: ./lint_string.sh "TODO:"
- run: ./lint_string.sh "FIXME "
- run: ./lint_string.sh "FIXME:"
- run: ./lint_string.sh "todo "
- run: ./lint_string.sh "todo:"
- run: ./lint_string.sh "fixme "
- run: ./lint_string.sh "fixme:"
- run: ./lint_string.sh "dbg!"

test:
name: test
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Update tod.gif to demonstrate current feel of app
- Check for TODO and dbg! on CI

## 2023-04-12 v0.3.10

- Include overdue tasks in date tasks functionality
Expand Down
9 changes: 9 additions & 0 deletions lint_string.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
grep -rE --include="*.rs" "$1" .
if [ $? -eq 0 ]; then
echo "'$1's found."
exit 1
else
echo "No '$1's found."
exit 0
fi
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Config {

pub fn create(self) -> Result<Config, String> {
let json = json!(self).to_string();
let mut file = fs::File::create(dbg!(&self.path)).or(Err("Could not create file"))?;
let mut file = fs::File::create(&self.path).or(Err("Could not create file"))?;
file.write_all(json.as_bytes())
.or(Err("Could not write to file"))?;
println!("Config successfully created in {}", &self.path);
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[cfg(test)]
#[macro_use]
extern crate matches;

extern crate clap;

use clap::{Arg, ArgAction, ArgMatches, Command};
Expand Down
Binary file modified tod.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ab50488

Please sign in to comment.