mirror of
https://github.com/Smaug123/FicroKanSharp
synced 2025-10-17 00:58:40 +00:00
Add peripheral stuff
This commit is contained in:
12
.config/dotnet-tools.json
Normal file
12
.config/dotnet-tools.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"fantomas-tool": {
|
||||
"version": "4.5.10",
|
||||
"commands": [
|
||||
"fantomas"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*.{fs,fsi,fsx}]
|
||||
fsharp_space_before_uppercase_invocation=true
|
||||
fsharp_space_before_member=true
|
||||
fsharp_space_before_colon=true
|
||||
fsharp_space_before_semicolon=true
|
||||
fsharp_multiline_block_brackets_on_same_column=true
|
||||
fsharp_newline_between_type_definition_and_members=true
|
||||
fsharp_keep_indent_in_branch=true
|
||||
fsharp_align_function_signature_to_indentation=true
|
||||
fsharp_alternative_long_member_definitions=true
|
||||
fsharp_disable_elmish_syntax=true
|
||||
fsharp_multi_line_lambda_closing_newline=true
|
29
.github/workflows/dotnet-core.yaml
vendored
Normal file
29
.github/workflows/dotnet-core.yaml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: .NET Core
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
- name: Install dependencies
|
||||
run: dotnet restore FicroKanSharp.sln
|
||||
- name: Build
|
||||
run: dotnet build FicroKanSharp.sln --configuration Release --no-restore
|
||||
- name: Test
|
||||
run: dotnet test FicroKanSharp.sln --no-restore --verbosity normal
|
||||
- name: Install Fantomas
|
||||
run: dotnet tool restore
|
||||
- name: Run Fantomas
|
||||
run: dotnet tool run fantomas --check -r .
|
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# FicroKanSharp
|
||||
|
||||
A microKanren implementation in F#.
|
||||
|
||||
# Development tips
|
||||
|
||||
There are pull request checks on this repo, enforcing [Fantomas](https://github.com/fsprojects/fantomas/)-compliant formatting.
|
||||
After checking out the repo, you may wish to add a pre-push hook to ensure locally that formatting is complete, rather than having to wait for the CI checks to tell you that you haven't formatted your code.
|
||||
Consider performing the following command to set this up in the repo:
|
||||
```bash
|
||||
git config core.hooksPath hooks/
|
||||
```
|
||||
Before your first push (but only once), you will need to install the [.NET local tools](https://docs.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use) which form part of the pre-push hook:
|
||||
```bash
|
||||
dotnet tool restore
|
||||
```
|
||||
|
17
hooks/pre-push
Normal file
17
hooks/pre-push
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
|
||||
def check_fantomas():
|
||||
result = subprocess.run(["dotnet", "tool", "run", "fantomas", "--check", "-r", "."])
|
||||
if result.returncode != 0:
|
||||
print(result.stdout)
|
||||
raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet tool run fantomas -r .`")
|
||||
|
||||
|
||||
def main():
|
||||
check_fantomas()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user