Skip to content

Instantly share code, notes, and snippets.

View ccfontes's full-sized avatar
🎯
Focusing

Carlos Fontes ccfontes

🎯
Focusing
View GitHub Profile
@ccfontes
ccfontes / prepare-commit-msg.hy
Created March 21, 2018 09:46
On git commit, adds message with JIRA ticket name and time spent working on commit to the commit editor
#!/usr/bin/env hy
(import sys)
(import subprocess)
(import [pathlib [Path]])
(import [functools [partial]])
(setv current-branch-name (subprocess.check_output ["git" "symbolic-ref" "--short" "HEAD"] :encoding "utf-8"))
(setv work-time (subprocess.check_output ["glass" "-s" "status" "--commit-template"] :encoding "utf-8"))
.error-bg {
color-background: #FFCCCC;
}
@ccfontes
ccfontes / search_no_tests.shs
Created October 4, 2023 05:22
Report untested shards
@wire(check-shard-no-tests {
= shard
"." | FS.Iterate(Recursive: true) >= filepaths
Remove(
filepaths
Predicate: {
Regex.Match(""".*(test|samples).*(\.shs|\.edn|\.clj)""") | Is([])
Or
FS.Read | ExpectString | String.Contains(shard) | Not })
When(Is([]) {