Skip to content
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
47 changes: 37 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,29 +1,56 @@
# top-most EditorConfig file
# EditorConfig: https://EditorConfig.org

# Top-level EditorConfig file
root = true

# global baselines
#### Core EditorConfig Options ####

# Global settings for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
indent_size = 2
tab_width = 2

line_length = 150
max_line_length = 150
trim_trailing_whitespace = true
insert_final_newline = true
# Disable max line length enforcement
max_line_length = off

#### File Type Overrides ####

# Markdown files
[*.md]

# Allow trailing whitespace for line breaks
trim_trailing_whitespace = false

[*.sh]

[*.{csproj,props,targets}]
indent_style = space
indent_size = 2
tab_width = 2

[*.{csproj,json,jsonc,xml,yaml,yml}]

[*.yml]
indent_style = space
indent_size = 2
tab_width = 2

# Batch and command files
[*.{cmd,bat}]
# Use CRLF for Windows specific files
end_of_line = crlf

# .NET source files
[*.{cs,vb}]
tab_width = 4

indent_style = space
indent_size = 4
end_of_line = lf
tab_width = 4

# .NET generated files
[*.g.cs]
generated_code = true
68 changes: 7 additions & 61 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,63 +1,9 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Normalize line endings.
* text=auto eol=lf

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
# NuGet lock files should always use LF
**/packages.lock.json text eol=lf

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
# Windows script files should use CRLF
*.cmd text eol=crlf
*.bat text eol=crlf
8 changes: 8 additions & 0 deletions .github/codeql/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: org-codeql-config

queries:
- uses: security-and-quality

query-filters:
- exclude:
id: actions/unpinned-tag
111 changes: 74 additions & 37 deletions .github/workflows/lint-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,109 @@
name: "Pull request"
name: Lint pull request

on:
pull_request_target:
branches:
- "main"
- "v[0-9]*"
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
- ready_for_review

concurrency:
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
pull-requests: write

jobs:
main:
name: lint PR title
runs-on: ubuntu-latest
lint:
runs-on: ubuntu-slim
if: ${{ !github.event.pull_request.draft }}

steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

# Configure additional validation for the subject based on a regex.
# We enforce that the subject starts with an uppercase character.
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
plan
subjectPattern: ^([A-Z]).+$

# If `subjectPattern` is configured, you can use this property to override
# the default error message that is shown when the pattern doesn't match.
# The variables `subject` and `title` can be used within the message.
subjectPatternError: >
The subject "**{subject}**" found in the pull request title "*{title}*"
didn't match the configured pattern. Please ensure that the subject
starts with an uppercase character.

# If the PR contains one of these newline-delimited labels, the
# validation is skipped. If you want to rerun the validation when
# labels change, you might want to use the `labeled` and `unlabeled`
# event triggers in your workflow.
The subject "**{subject}**" must start with an uppercase character.
Example: "Add feature" instead of "add feature"
ignoreLabels: |
bot
dependencies
automated

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: >
### Hey there and thank you for opening this pull request! 👋🏼
message: |
### ⚠️ Invalid Pull Request title

Your PR title must follow the format: `type: Subject` where:
- `type` is one of the conventional commit types (in lowercase)
- `Subject` starts with an uppercase letter

> [!CAUTION]
> ${{ steps.lint_pr_title.outputs.error_message }}

#### Valid examples

- `feat: Add API endpoint for market data`
- `fix: Resolve WebSocket connection issues`
- `plan: Define technical implementation approach`
- `chore: Update NuGet dependencies`

<details>
<summary>see more valid examples</summary>

#### Features & fixes
- `feat: Add API endpoint for market data`
- `fix: Resolve WebSocket connection issues`

It looks like your proposed **_Pull request title_** needs to be adjusted.
#### Planning & architecture
- `plan: Define technical implementation approach`

>🚩 **Error** » ${{ steps.lint_pr_title.outputs.error_message }}
#### Code quality
- `style: Format trading strategy classes`
- `refactor: Restructure trading engine components`
- `perf: Optimize trade order execution flow`

#### Pull request title naming convention
#### Documentation & testing
- `docs: Update API documentation`
- `test: Add unit tests for sign-in flow`

Our PR title name taxonomy is `type: Subject`, where **type** is typically
*feat*, *fix*, or *chore*, and **subject** is a phrase (proper noun) that starts
with a capitalized letter. The *chore* type usually has a subject that starts
with an action verb like *Add* or *Update*. Examples:
#### Infrastructure
- `build: Update .NET SDK version to 10.0`
- `ci: Add workflow for performance testing`
- `chore: Update NuGet dependencies`

- _feat: Admin portal login_
- _fix: Divide by zero in X calculation_
- _chore: Update packages_
- _docs: Improve setup guidance_
#### Other
- `revert: Remove faulty market data provider`

See the [Conventional Commits specification](https://www.conventionalcommits.org) for more information.
See [Conventional Commits](https://www.conventionalcommits.org)
for more details.
</details>

# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/lock-issues-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lock closed threads

on:
schedule:
- cron: "0 4 * * 0"
- cron: 0 4 * * 0
workflow_dispatch:

permissions:
Expand All @@ -15,9 +15,11 @@ concurrency:

jobs:
lock:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
timeout-minutes: 10

steps:
- uses: dessant/lock-threads@v5
- uses: dessant/lock-threads@v6
with:
process-only: issues, prs
issue-inactive-days: "90"
Expand Down
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

Loading
Loading