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

Support apple M1 CPU architecture #45

Open
wants to merge 5 commits into
base: next
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
use flake
eval "./scripts/bootstrap.sh"

export CASCADE_POSTGRES_HOST=localhost
export CASCADE_POSTGRES_PORT=5432
export CASCADE_POSTGRES_USER=cascade
export CASCADE_POSTGRES_PASSWORD=cascade
export CASCADE_POSTGRES_DATABASE=cascade-dev
267 changes: 132 additions & 135 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,136 +1,133 @@
exclude: '(nix/sources.nix$)'
exclude: "(nix/sources.nix$)"
repos:
- repo: local
hooks:
#############################################
# Constitutionals
#
# Reference: https://github.com/pre-commit/pre-commit-hooks/blob/d0d9883648b4b30a43cd965471c9b5fa8f8a4131/.pre-commit-hooks.yaml
- name: Check for case conflicts
id: check-case-conflict
language: system
entry: check-case-conflict

- name: Check for merge conflicts
id: check-merge-conflict
types: [text]
language: system
entry: check-merge-conflict

- name: Check for broken symlinks
id: check-symlinks
types: [symlink]
language: system
entry: check-symlinks

- name: Check vcs permalinks
id: check-vcs-permalinks
types: [text]
language: system
entry: check-vcs-permalinks

- name: Fix End of Files
id: end-of-file-fixer
types: [text]
language: system
entry: end-of-file-fixer

- name: Trim Trailing Whitespace
id: trailing-whitespace
types: [text]
language: system
entry: trailing-whitespace-fixer

- name: Check © headers
id: headroom
always_run: true
language: system
pass_filenames: false
entry: headroom run


#############################################
# JSON
- name: Check JSON for parsability
id: check-json
types: [json]
language: system
entry: check-json


#############################################
# YAML
- name: Check YAML for parsability
id: check-yaml
types: [yaml]
language: system
entry: check-yaml

- name: Static analysis YAML with yamllint
id: yamllint
types: [yaml]
language: system
entry: yamllint


#############################################
# Nix
- name: Check Nix code style with nixpkgs-fmt
id: nixpkgs-fmt
files: '\.nix$'
language: system
entry: nixpkgs-fmt

- name: Static analysis Nix with nix-linter
id: nix-linter
files: '\.nix$'
language: system
entry: nix-linter

#############################################
# Dhall
- name: Check Dhall code style
id: dhall-format
files: '\.dhall$'
language: system
entry: ./scripts/fmap.sh "dhall format --inplace"

- name: Static analysis Dhall
id: dhall-lint
files: '\.dhall$'
language: system
entry: ./scripts/fmap.sh "dhall lint --inplace"

#############################################
# Shell
- name: Check shell code style with shfmt
id: shfmt
types: [shell]
language: system
entry: shfmt

- name: Static analysis shell scripts with shellcheck
id: shellcheck
types: [shell]
language: system
entry: shellcheck -x

#############################################
# Haskell
- name: Check Haskell code style with stylish-hasklel
id: stylish-haskell
files: '\.hs$'
language: system
entry: stylish-haskell --inplace

- name: Static analysis Haskell with hlint
id: hlint
files: '\.hs$'
language: system
entry: hlint

# - name: Static analysis Haskell with stan
# id: stan
# files: '\.hs$'
# language: system
# entry: stan
- repo: local
hooks:
#############################################
# Constitutionals
#
# Reference: https://github.com/pre-commit/pre-commit-hooks/blob/d0d9883648b4b30a43cd965471c9b5fa8f8a4131/.pre-commit-hooks.yaml
- name: Check for case conflicts
id: check-case-conflict
language: system
entry: check-case-conflict

- name: Check for merge conflicts
id: check-merge-conflict
types: [text]
language: system
entry: check-merge-conflict

- name: Check for broken symlinks
id: check-symlinks
types: [symlink]
language: system
entry: check-symlinks

- name: Check vcs permalinks
id: check-vcs-permalinks
types: [text]
language: system
entry: check-vcs-permalinks

- name: Fix End of Files
id: end-of-file-fixer
types: [text]
language: system
entry: end-of-file-fixer

- name: Trim Trailing Whitespace
id: trailing-whitespace
types: [text]
language: system
entry: trailing-whitespace-fixer

- name: Check © headers
id: headroom
always_run: true
language: system
pass_filenames: false
entry: headroom run

#############################################
# JSON
- name: Check JSON for parsability
id: check-json
types: [json]
language: system
entry: check-json

#############################################
# YAML
- name: Check YAML for parsability
id: check-yaml
types: [yaml]
language: system
entry: check-yaml

- name: Static analysis YAML with yamllint
id: yamllint
types: [yaml]
language: system
entry: yamllint

#############################################
# Nix
- name: Check Nix code style with nixpkgs-fmt
id: nixpkgs-fmt
files: '\.nix$'
language: system
entry: nixpkgs-fmt

- name: Static analysis Nix with nix-linter
id: nix-linter
files: '\.nix$'
language: system
entry: nix-linter

#############################################
# Dhall
- name: Check Dhall code style
id: dhall-format
files: '\.dhall$'
language: system
entry: dhall format

- name: Static analysis Dhall
id: dhall-lint
files: '\.dhall$'
language: system
entry: dhall lint

#############################################
# Shell
- name: Check shell code style with shfmt
id: shfmt
types: [shell]
language: system
entry: shfmt

- name: Static analysis shell scripts with shellcheck
id: shellcheck
types: [shell]
language: system
entry: shellcheck -x

#############################################
# Haskell
- name: Check Haskell code style with stylish-hasklel
id: stylish-haskell
files: '\.hs$'
language: system
entry: stylish-haskell --inplace

- name: Static analysis Haskell with hlint
id: hlint
files: '\.hs$'
language: system
entry: hlint

# - name: Static analysis Haskell with stan
# id: stan
# files: '\.hs$'
# language: system
# entry: stan
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages: cascade-prelude, cascade-api, cascade-cli
with-compiler: ghc-8.8.4
with-compiler: ghc-8.10.7
optimization: False
documentation: True
write-ghc-environment-files: always
Expand Down
Loading