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
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# This file is the top-most editor configuration file
root = true

# Default settings for all files
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# Turns the maximum line length off for Markdown files, as we use the automatic word wrap of the code editor
[*.md]
max_line_length = off

# C# project files use 2 spaces for indentation
[*.csproj]
indent_size = 2
62 changes: 62 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

# Normalize line endings for all text files to Unix-style (LF) on commit; Git auto-detects whether a file is text and, if so, stores it with LF in the
# repository regardless of the line endings used in the working tree
* text=auto eol=lf

# Source and configuration files that should always be treated as text and normalized to LF
*.cs text
*.csproj text
*.sln text eol=crlf
*.props text
*.targets text
*.json text
*.jsonc text
*.md text
*.yml text
*.yaml text
*.toml text
*.xml text
*.svg text
*.txt text
*.editorconfig text
*.gitattributes text
*.gitignore text
Dockerfile text
Containerfile text
compose.yaml text

# Shell scripts must always use LF, otherwise they break on Unix systems
*.sh text eol=lf
*.bash text eol=lf

# Windows-only scripts must keep CRLF, otherwise they break on Windows
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Binary files that must never be normalized or line-ending converted
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.avif binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.otf binary
*.pdf binary
*.zip binary
*.gz binary
*.7z binary
*.mp4 binary
*.webm binary
*.mov binary
*.mp3 binary
*.wav binary
*.dll binary
*.exe binary
*.node binary
*.snap binary -diff
58 changes: 58 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# The display name of the workflow, shown in the "Actions" tab of the GitHub repository and in the checks of a commit or pull request
name: Linters

# Defines the events that trigger this workflow; this workflow runs on every push to any branch of the repository
on:
push:

# Defines the jobs that make up the workflow; all jobs run in parallel by default, but here every linter is a separate step of a single job, so that
# they all share the same checked-out working tree and Node.js installation
jobs:
# A single job that runs all linters and code formatters of the project on a virtual machine with the latest Ubuntu image, which is the fastest and
# cheapest of the available runners
lint:
name: Run Linters
runs-on: ubuntu-latest

# The sequence of tasks that are executed as part of the job; the steps run sequentially in the same runner and share the same file system
steps:
# Checks out the repository into the runner's working directory, so that the linters have access to the source code and their configuration
# files; the "actions/checkout" action is pinned to a major version to receive non-breaking updates automatically
- name: Checkout Repository
uses: actions/checkout@v7

# Installs Node.js, which is required to run the npm-based linters CSpell and MarkdownLint, as well as the dprint code formatter, which is
# distributed as an npm package; pins the Node.js version to the current long-term support release, so that the linters run in a stable and
# reproducible environment
- name: Set Up Node.js
uses: actions/setup-node@v6
with:
node-version: 24

# Installs the linters and the code formatter globally, so that they are available as commands in the subsequent steps; installing them in a
# dedicated step keeps the linter steps below focused on just running the tools
- name: Install Linters
run: npm install --global dprint@0.55.1 cspell@10.0.1 markdownlint-cli2@0.23.0

# Runs the dprint code formatter in check mode; "check" only verifies that all files are already formatted and exits with a non-zero status code
# if any file is not, but unlike "dprint fmt" it never modifies any file; dprint automatically discovers the "dprint.json" stub in the
# repository root, which extends the real configuration in "tests/linters", so no configuration path has to be passed explicitly, and the
# "**/*" glob makes dprint check the whole repository (relative to the working directory)
- name: Check Formatting (dprint)
run: dprint check "**/*"

# Runs the CSpell spell checker over every file in the repository; the "lint" command reports spelling mistakes and exits with a non-zero status
# code if any are found, the configuration path is passed explicitly, and "--no-progress" suppresses the per-file progress output to keep the
# log readable; the "if" ensures that the step runs (unless the workflow was cancelled), even if the previous linter reported an error and
# exited with a non-zero exit code, so that the job runs all linters instead of stopping at the first failure
- name: Spell Check (CSpell)
if: ${{ !cancelled() }}
run: cspell lint --config tests/linters/.cspell.json --no-progress "**/*"

# Runs the MarkdownLint linter over all Markdown files in the repository; the configuration path is passed explicitly via "--config", and the
# build output directories are excluded using markdownlint-cli2's "#"-prefixed negated globs (markdownlint-cli2 has no "--ignore" flag), so that
# only the project's own documentation is linted; the "if" ensures that the step runs (unless the workflow was cancelled), even if the previous
# linter reported an error and exited with a non-zero exit code, so that the job runs all linters instead of stopping at the first failure
- name: Lint Markdown (MarkdownLint)
if: ${{ !cancelled() }}
run: markdownlint-cli2 --config tests/linters/.markdownlint.yml "**/*.md" "#**/bin/**" "#**/obj/**"
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@

# Ignores the build outputs
# Operating system thumbnail databases
.DS_Store
Thumbs.db

# IDEs and code editors (Visual Studio Code settings, launch configuration, tasks, and extensions are excluded)
.c9/
.classpath
.history/*
.project
.settings/
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
*.launch
*.sublime-workspace
/.idea

# Build output
bin/
obj/

# To Do Lists
TODO.md

# Miscellaneous tool logs, outputs, and caches
.VSCodeCounter/
25 changes: 25 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// List of extensions which should be recommended for users of this workspace
"recommendations": [
// Language support for .gitignore files
"codezombiech.gitignore",

// Perform spell-checking of the documentation, code, and comments with support for warnings/errors in Visual Studio Code
"streetsidesoftware.code-spell-checker",

// Integrates MarkdownLint into the editor
"DavidAnson.vscode-markdownlint",

// Integrates the dprint code formatter into the editor
"dprint.dprint",

// Adds useful features for editing Markdown tables
"TakumiI.markdowntable",

// Highlights TODOs, FIXMEs, HACKs, DEBUGs, REVIEWs, and NOTEs inside of code files
"wayou.vscode-todo-highlight",

// Integrates many useful features for editing Markdown
"yzhang.markdown-all-in-one",
],
}
118 changes: 106 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,112 @@

{
// A vertical ruler in the code editor at 150 characters, this is a visual aide to help users keep the 150 character line limit file files that
// warrant a line limit
"editor.rulers": [150],

// Maps file names to file types; this is required when Visual Studio Code does not correctly auto-detect file types based on file extension
"files.associations": {
"**/.vscode/*.json": "jsonc",
"dprint.json": "jsonc",
"LICENSE": "plaintext",
},

// Excludes certain files from being displayed in the file explorer
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
".VSCodeCounter": true,
"**/.DS_Store": true,
"**/.git": true,
"**/bin": true,
"**/obj": true
"**/obj": true,
"**/Thumbs.db": true,
},

// Excludes certain files from being watched by the file watcher, this is required, because if the data directory is inside of the workspace, then
// Visual Studio Code will watch the entire directory, which can not only cause performance issues, but will also cause the file watcher to run
// out of file handles, which are limited by the operating system, that are necessary to watch the files
"files.watcherExclude": {
".VSCodeCounter": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/bin": true,
"**/obj": true,
},

// Configures the nesting of files that belong together in the explorer (the nested files are not expanded by default); this configuration nests
// all Node.js-related configuration files under the "package.json" file, and all linter and code formatter configuration files under the
// ".editorconfig" file
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
".editorconfig": ".gitattributes, .gitignore, dprint.json",
"README.md": "CHANGELOG.md, CONTRIBUTORS.md, LICENSE, TODO.md",
},
"cSpell.words": [
"Neumann",
"Xunit",
"paket",
"vvvcccaaa"
]

// Specifies which Git branches are protected in this repository, Visual Studio will prevent users from committing to these branches (this only
// works for the commit feature that is built into Visual Studio Code and not in the terminal)
"git.branchProtection": [
"main",
"staging",
],

// Specifies that Visual Studio Code should always open the merge editor when a file is opened that has conflicts, instead of the code editor
"git.mergeEditor": true,

// Allows users to force push to a remote Git repository, as we regularly make use of "git commit --amend" in this project
"git.allowForcePush": true,

// Tells Visual Studio Code to fetch all branches instead of only the current one when pulling from a remote repository and to prune references
// to remote objects that no longer exist
"git.fetchOnPull": true,
"git.pruneOnFetch": true,

// Specifies that Visual Studio Code should push tags and perform a rebase instead of a merge when synching with a remote repository
"git.followTagsWhenSync": true,
"git.rebaseWhenSync": true,

// Imports the external settings for the code spell checker CSPell, furthermore, the "ignorePaths" and the "useGitignore" settings are reset,
// because they overwrite the settings in the imported configuration, also the diagnostic level is increased from "Information" to "Error" to
// indicate that spelling mistakes must be corrected
"cSpell.ignorePaths": [],
"cSpell.useGitignore": false,
"cSpell.diagnosticLevel": "Error",
"cSpell.import": ["${workspaceFolder}/tests/linters/.cspell.json"],

// Configures the Markdown linter MarkdownLint to use our custom configuration
"markdownlint.config": { "extends": "${workspaceFolder}/tests/linters/.markdownlint.yml" },

// Configures the code formatter dprint
"dprint.verbose": true,
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnType": false,
"editor.formatOnSave": true,

// A list of domains from which JSON schema files are automatically downloaded
"json.schemaDownload.trustedDomains": {
"https://developer.microsoft.com/json-schemas/": true,
"https://json-schema.org/": true,
"https://json.schemastore.org/": true,
"https://plugins.dprint.dev/": true,
"https://raw.githubusercontent.com/devcontainers/spec/": true,
"https://raw.githubusercontent.com/microsoft/vscode/": true,
"https://schemastore.azurewebsites.net/": true,
"https://www.schemastore.org/": true,
},

// Configures the icon theme to be VSCode Icons and adapts the icons of certain files and directories for the VSCode Icons plugin
"workbench.iconTheme": "vscode-icons",
"vsicons.associations.files": [
{ "icon": "dal", "extensions": ["CHANGELOG.md"], "filename": true, "format": "svg" },
{ "icon": "docz", "extensions": ["README.md"], "filename": true, "format": "svg" },
{ "icon": "janet", "extensions": ["CONTRIBUTORS.md"], "filename": true, "format": "svg" },
{ "icon": "todo", "extensions": ["TODO.md"], "filename": true, "format": "svg" },
{ "icon": "vscode", "extensions": [".vscode/extensions.json", ".vscode/settings.json"], "filename": true, "format": "svg" },
],
"vsicons.associations.folders": [
{ "icon": "app", "extensions": ["sample-app"], "format": "svg" },
{ "icon": "cli", "extensions": ["clinet-core"], "format": "svg" },
{ "icon": "coverage", "extensions": ["linters"], "format": "svg" },
{ "icon": "github", "extensions": ["workflows"], "format": "svg" },
{ "icon": "template", "extensions": ["design"], "format": "svg" },
{ "icon": "test", "extensions": ["unit-tests"], "format": "svg" },
],
}
31 changes: 0 additions & 31 deletions .vscode/tasks.json

This file was deleted.

34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changelog

## v0.3.0

*To be determined.*

Complete rewrite as a .NET 10 library using the modern application hosting model and an API that mirrors ASP.NET Core.

In addition to the rewrite, the following changes were made:

- Since the permissive MIT license has recently been used more and more by large corporations to take from the open source community and not give anything back, the license of this project was changed from MIT to LGPL 3.0. The LGPL still allows people to freely use the library in their own software, even for commercial projects, but making any changes to it forces the derivative work to be released under the same license, thus forcing companies to give back to the community.
- The project now uses a set of linters and a code formatter to (1) find and correct problems in the code and (2) to consistently format all files. If you use Visual Studio Code to work on the project, all linters and the code formatter are configured to directly work in the code editor. A set of recommended extensions is included for the linters and the code formatter. The following tools are being used:
- **CSpell**, a spell checker for code, to ensure that there are no misspellings in the code.
- **MarkdownLint**, a linter for Markdown files, which ensures that the Markdown files are consistently formatted and standards are enforced.
- **dprint**, an unopinionated, configurable code formatter with plugins for many languages. This code formatter is used to format Markdown, JSON, XML, YAML, and TOML files in the project.
- A completely new, modern logo was designed, which heavily borrows from the ASP.NET Core logo, with the "C" wordmark and a dot. The logo is available in both light and dark mode variants in the `design/` directory and a design guide for it was created.

## v0.2.0

*Never released.*

Complete rewrite as a .NET Core .NET Standard library with cross-platform support. Was never released and skipped.

## v0.1.1

*Released on July 1, 2016.*

Improved the error handling of the command line parser. Lexical and syntactical errors can now be handled.

## v0.1.0

*Released on June 15, 2016.*

The initial release of the command line parser.
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CLI.NET Core Contributors

This is a list of all people who have contributed to the CLI.NET Core project in alphabetical order. If you have made any contributions to this project, please add yourself to the list.

- [David Neumann](https://github.com/lecode-official)
Loading