Skip to content
New issue

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

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

Already on GitHub? # to your account

Linting #425

Merged
merged 9 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{:linters {:if {:level :off}
:unused-namespace {:level :off}
:unused-binding {:level :off}
:unresolved-symbol
{:exclude
[(clojure.core.match/match)
(cljs.core.match/match)
(io.pedestal.interceptor.error/error-dispatch)
(orcpub.modifiers/modifier)
(orcpub.modifiers/deferred-modifier)
(orcpub.modifiers/cum-sum-mod)
(orcpub.modifiers/vec-mod)
(orcpub.modifiers/set-mod)
(orcpub.modifiers/map-mod)
(orcpub.modifiers/fn-mod)
(orcpub.dnd.e5.modifiers/spells-known-cfg)
(orcpub.dnd.e5.modifiers/prop-trait)
(orcpub.dnd.e5.modifiers/dependent-trait)
(orcpub.dnd.e5.modifiers/dependent-trait-2)
(orcpub.dnd.e5.modifiers/skill-proficiency)
(orcpub.dnd.e5.modifiers/skill-expertise)
(orcpub.dnd.e5.modifiers/tool-expertise)
(orcpub.dnd.e5.modifiers/ac-bonus-fn)
(orcpub.dnd.e5.modifiers/attack)
(orcpub.dnd.e5.modifiers/action)
(orcpub.dnd.e5.modifiers/bonus-action)
(orcpub.dnd.e5.modifiers/reaction)
(orcpub.dnd.e5.modifiers/level-val)
(orcpub.entity-spec/make-entity)
(orcpub.routes-test/with-conn)]}}
:lint-as {reagent.core/with-let clojure.core/let
hiccup.def/defhtml clojure.core/defn}}
9 changes: 0 additions & 9 deletions .ebextensions/https-instance-securitygroup.config

This file was deleted.

18 changes: 8 additions & 10 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ name: Continuous Integration
on: [pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run linter
run: lein lint
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Clojure tools
uses: DeLaGuardo/setup-clojure@master
with:
tools-deps: latest
lein: latest
boot: latest
- name: Run tests
run: lein test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pom.xml
/out/
/target/
/node_modules/
/.clj-kondo/.cache
.lein-deps-sum
.lein-repl-history
.lein-plugins/
Expand Down
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

29 changes: 14 additions & 15 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@
[vvvvalvalval/datomock "0.2.0"]
[com.datomic/datomic-free "0.9.5697"]
[funcool/cuerdas "2.2.0"]
[camel-snake-kebab "0.4.0"]
]
[camel-snake-kebab "0.4.0"]]

:plugins [[lein-figwheel "0.5.19"]
[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]
[lein-garden "0.3.0"]
[lein-environ "1.1.0"]
[lein-cljfmt "0.6.8"]
[lein-kibit "0.1.8"]
#_[lein-resource "16.9.1"]]

:source-paths ["src/clj" "src/cljc" "src/cljs"]
Expand All @@ -81,14 +82,14 @@

:uberjar-name "orcpub.jar"

:garden {:builds [{ ;; Optional name of the build:
:garden {:builds [{;; Optional name of the build:
:id "screen"
;; Source paths where the stylesheet source code is
:source-paths ["src/clj" "src/cljc"]
;; The var containing your stylesheet:
:stylesheet orcpub.styles.core/app
;; Compiler flags passed to `garden.core/css`:
:compiler { ;; Where to save the file:
:compiler {;; Where to save the file:
:output-to "resources/public/css/compiled/styles.css"
;; Compress the output?
:pretty-print? false}}]}
Expand All @@ -97,8 +98,7 @@

:cljsbuild {:builds
{:dev
{
:source-paths ["web/cljs" "src/cljc" "src/cljs"]
{:source-paths ["web/cljs" "src/cljc" "src/cljs"]

;; the presence of a :figwheel configuration here
;; will cause figwheel to inject the figwheel client
Expand All @@ -114,10 +114,9 @@
:asset-path "/js/compiled/out"
:output-to "resources/public/js/compiled/orcpub.js"
:output-dir "resources/public/js/compiled/out"
:source-map-timestamp true}}}
}
:source-map-timestamp true}}}}

:figwheel { ;; :http-server-root "public" ;; default and assumes "resources"
:figwheel {;; :http-server-root "public" ;; default and assumes "resources"
;; :server-port 3449 ;; default
;; :server-ip "127.0.0.1"

Expand Down Expand Up @@ -153,12 +152,11 @@
;; :server-logfile "tmp/logs/figwheel-logfile.log"
}

:repl-options {
;; If nREPL takes too long to load it may timeout,
:repl-options {;; If nREPL takes too long to load it may timeout,
;; increase this to wait longer before timing out.
;; Defaults to 30000 (30 seconds)
:timeout 300000 ; 5 mins to wait
}
:timeout 300000 ; 5 mins to wait
}

;; setting up nREPL for Figwheel and ClojureScript dev
;; Please see:
Expand All @@ -172,6 +170,7 @@
"externs" ["do" "clean"
["run" "-m" "externs"]]
"rebuild-modules" ["run" "-m" "user" "--rebuild-modules"]
"lint" ["with-profile" "lint" "run" "-m" "clj-kondo.main" "--lint" "src"]
"prod-build" ^{:doc "Recompile code with prod profile."}
["externs"
["with-profile" "prod" "cljsbuild" "once" "main"]]}
Expand Down Expand Up @@ -219,14 +218,14 @@
:omit-source true
:cljsbuild {:builds
{:prod
{
:source-paths ["web/cljs" "src/cljc" "src/cljs"]
{:source-paths ["web/cljs" "src/cljc" "src/cljs"]
:compiler {:main orcpub.core
:asset-path "/js/compiled/out"
:output-to "resources/public/js/compiled/orcpub.js"
;;:output-dir "resources/public/js/compiled/out"
:optimizations :advanced
:pretty-print false}}}}}
:lint {:dependencies [[clj-kondo "RELEASE"]]}
;; Use like: lein with-profile +start-server repl
:start-server {:repl-options {:init-ns user
:init (start-server)}}})
6 changes: 0 additions & 6 deletions src/clj/orcpub/db/schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
:db/cardinality :db.cardinality/one
:db/noHistory true})

(defn fulltext-prop [key]
{:db/ident key
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/fulltext true})

(defn fulltext-prop [key]
{:db/ident key
:db/valueType :db.type/string
Expand Down
6 changes: 3 additions & 3 deletions src/clj/orcpub/email.clj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
:subject "Exception"
:body [{:type "text/plain"
:content (let [writer (java.io.StringWriter.)]
(do (clojure.pprint/pprint (:request context) writer)
(clojure.pprint/pprint (or (ex-data exception) exception) writer)
(str writer)))}]})))
(clojure.pprint/pprint (:request context) writer)
(clojure.pprint/pprint (or (ex-data exception) exception) writer)
(str writer))}]})))

Loading