-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cleanup and bump dependencies * Cleanup linter errors * Add deps.edn
- Loading branch information
1 parent
332f214
commit 1a110d3
Showing
26 changed files
with
365 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:lint-as {flanders.macros/defleaf schema.core/defrecord | ||
flanders.core/def-entity-type clojure.core/def}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{:lint-as {schema.test/deftest clojure.test/deftest}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
;;; Directory Local Variables | ||
;;; For more information see (info "(emacs) Directory Variables") | ||
|
||
((clojure-mode . ((cider-clojure-cli-aliases . ":test")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Code check | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
|
||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
lein: latest | ||
cli: latest | ||
clj-kondo: latest | ||
|
||
- name: Check clojure code | ||
run: | ||
clj-kondo --lint ./src --lint ./test | ||
|
||
- name: Cache lein project dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-clojure-${{ hashFiles('**/project.clj', '**/deps.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-clojure | ||
- name: Run Clojure CLI tests | ||
run: | ||
clojure -X:test | ||
|
||
- name: Run leiningen tests | ||
run: | ||
lein test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ pom.xml.asc | |
/.nrepl-port | ||
.hgignore | ||
.hg/ | ||
/.clj-kondo/.cache | ||
/.lsp/.cache | ||
/.cpcache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{:paths ["src"] | ||
:deps {metosin/ring-swagger {:mvn/version "0.26.2"} | ||
metosin/schema-tools {:mvn/version "0.13.1"} | ||
org.clojure/clojure {:mvn/version "1.10.1"} | ||
org.clojure/core.match {:mvn/version "1.0.0"} | ||
org.clojure/test.check {:mvn/version "1.1.1"} | ||
prismatic/schema {:mvn/version "1.4.1"}} | ||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}} | ||
:main-opts ["-m" "cognitect.test-runner"] | ||
:exec-fn cognitect.test-runner.api/test}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
(ns flanders.macros | ||
(:require [flanders.protocols | ||
:refer [branch? node-children make-node TreeNode]] | ||
[schema.core :as s])) | ||
(:require | ||
[flanders.protocols :as p] | ||
[schema.core :as s])) | ||
|
||
(defmacro defleaf [name argsv & sexprs] | ||
`(s/defrecord ~name ~argsv | ||
TreeNode | ||
(branch? [_#] false) | ||
(node-children [_#] nil) | ||
(make-node [this# _#] this#) | ||
p/TreeNode | ||
(~'branch? [_#] false) | ||
(~'node-children [_#] nil) | ||
(~'make-node [this# _#] this#) | ||
~@sexprs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.