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

i9/Replace pre-commit manager #20

Merged
merged 11 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**/.idea/*
**/.vscode/*

# Ignore Python Virtual Environment
venv/

# Ignore DB secrets
**/secrets

Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
#Use dotnet format already installed on your machine
- id: dotnet-format
name: dotnet-format
language: system
entry: dotnet format --severity info --include
verbose: true
types_or: ["c#", "vb"]
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
help:
@echo 'help - Print this information'
@echo 'restore - Restore the project for development'
@echo 'format - Run dotnet format with whitespace, style and analyzers set'
restore:
python3 -m venv venv
. ./venv/bin/activate
python3 -m pip install -r requirements.pip
dotnet tool restore
dotnet restore
pre-commit install
format:
dotnet format --severity info
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Speiderapp

Speiderapp is a mobile-first webapp for (norwegian) scouts.
Dentsor marked this conversation as resolved.
Show resolved Hide resolved

## Backend (API)
We use a ASP.NET backend as for the API. Please read separate [README.md](./SpeiderappAPI/README.md).


# Common setup

## Requirements
This project expect the use of a Unix-like, like Mac OS, Linux or WSL.
It can probably run on Windows/others too, but this may need adapting some commands.

## Use of Makefile
This project is using a �makefile� for handling setup and common tasks.
Dentsor marked this conversation as resolved.
Show resolved Hide resolved

The following commands are supported:
* make help - Print this information
* make restore - Restore the project for development
* make format - Run dotnet format with whitespace, style and analyzers set
9 changes: 4 additions & 5 deletions SpeiderappAPI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ Speiderapp API back-end
* [Docker](https://docker.com)


## Clone and run install-script
## Clone and restore project

```bash
# Clone the repo (example uses ssh)
git clone [email protected]:dotClique/SpeiderappAPI.git
cd ./SpeiderappAPI

# Run install script
yarn install
# Install dependencies, setup hooks, restore projects etc.
make restore
```


## Prepare and start development server (in Docker)

The service is run in Docker.
The service is run in Docker, but setup is run outside.

Before initial setup, create the necessary secrets-files:
```bash
Expand Down
21 changes: 0 additions & 21 deletions package.json

This file was deleted.

1 change: 1 addition & 0 deletions requirements.pip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pre-commit==2.16.0
Loading