Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
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
127 changes: 127 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories.
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{cmd,ps1}]
end_of_line = crlf

[*.cs]
guidelines = 120
max_line_length = 100

csharp_style_namespace_declarations = file_scoped
dotnet_code_quality.CA1062.null_check_validation_methods = CreateAndFake.Design.ArgumentGuard.ThrowIfNull

#### Naming styles: ####

# Define naming styles:
dotnet_naming_style.underscored_camel.required_prefix = _
dotnet_naming_style.underscored_camel.capitalization = camel_case

dotnet_naming_style.underscored_pascal.required_prefix = _
dotnet_naming_style.underscored_pascal.capitalization = pascal_case

dotnet_naming_style.underscored_i.required_prefix = I
dotnet_naming_style.underscored_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.camel_case.capitalization = camel_case

# Define symbol groups:
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_static_fields.required_modifiers = static

dotnet_naming_symbols.interfaces.applicable_kinds = interface

dotnet_naming_symbols.structures.applicable_kinds = class, struct, interface, enum, property, event, method, type_parameter

dotnet_naming_symbols.locals.applicable_kinds = parameters, local, local_function

# Define naming rules:
dotnet_naming_rule.private_fields_prefix.symbols = private_fields
dotnet_naming_rule.private_fields_prefix.style = underscored_camel
dotnet_naming_rule.private_fields_prefix.severity = warning

dotnet_naming_rule.private_static_fields_prefix.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_prefix.style = underscored_pascal
dotnet_naming_rule.private_static_fields_prefix.severity = warning

dotnet_naming_rule.interfaces_prefix.symbols = interfaces
dotnet_naming_rule.interfaces_prefix.style = begins_with_i
dotnet_naming_rule.interfaces_prefix.severity = warning

dotnet_naming_rule.structures_casing.symbols = structures
dotnet_naming_rule.structures_casing.style = pascal_case
dotnet_naming_rule.structures_casing.severity = warning

dotnet_naming_rule.locals_casing.symbols = locals
dotnet_naming_rule.locals_casing.style = camel_case
dotnet_naming_rule.locals_casing.severity = warning

#### Analyzer Overrides ####

dotnet_analyzer_diagnostic.severity = warning

# Controlled by CSharpier.
dotnet_diagnostic.IDE0055.severity = None
dotnet_diagnostic.MA0051.severity = None

# Bad warnings that can create bugs or are clearly intended behavior.
dotnet_diagnostic.CA1000.severity = None
dotnet_diagnostic.CA1040.severity = None
dotnet_diagnostic.MA0018.severity = None
dotnet_diagnostic.MA0165.severity = None
dotnet_diagnostic.RCS1241.severity = None
dotnet_diagnostic.S1133.severity = None
dotnet_diagnostic.S1694.severity = None
dotnet_diagnostic.S1994.severity = None
dotnet_diagnostic.S3011.severity = None
dotnet_diagnostic.S3220.severity = None
dotnet_diagnostic.S3453.severity = None
dotnet_diagnostic.S3878.severity = None

# Redundancy that's good for clarity.
dotnet_diagnostic.CA1805.severity = None
dotnet_diagnostic.RCS1033.severity = None
dotnet_diagnostic.RCS1034.severity = None
dotnet_diagnostic.RCS1071.severity = None
dotnet_diagnostic.RCS1129.severity = None
dotnet_diagnostic.RCS1188.severity = None
dotnet_diagnostic.S108.severity = None
dotnet_diagnostic.S1125.severity = None
dotnet_diagnostic.S1199.severity = None
dotnet_diagnostic.S3626.severity = None

# Unnecessary overcaution against default behavior that hurts readability.
dotnet_diagnostic.IDE0045.severity = None
dotnet_diagnostic.IDE0046.severity = None
dotnet_diagnostic.IDE0048.severity = None
dotnet_diagnostic.MA0002.severity = None
dotnet_diagnostic.MA0003.severity = None
dotnet_diagnostic.MA0006.severity = None
dotnet_diagnostic.MA0076.severity = None
dotnet_diagnostic.MA0169.severity = None
dotnet_diagnostic.RCS1089.severity = None
dotnet_diagnostic.RCS1123.severity = None
dotnet_diagnostic.S1751.severity = None
dotnet_diagnostic.S2743.severity = None
dotnet_diagnostic.S3993.severity = None

# Design choice.
dotnet_diagnostic.MA0029.severity = None
dotnet_diagnostic.MA0071.severity = None
dotnet_diagnostic.RCS1112.severity = None
dotnet_diagnostic.RCS1211.severity = None
dotnet_diagnostic.S3267.severity = None

# Deprecated.
dotnet_diagnostic.MA0038.severity = None
dotnet_diagnostic.MA0041.severity = None
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.cmd text eol=crlf
*.ps1 text eol=crlf
91 changes: 91 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Contributor Covenant 3.0 Code of Conduct

## Our Pledge

We pledge to make our community welcoming, safe, and equitable for all.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.


## Encouraged Behaviors

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:

1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
3. Respecting **different viewpoints** and experiences.
4. **Taking responsibility** for our actions and contributions.
5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.


## Restricted Behaviors

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.

1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.

### Other Restrictions

1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.


## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, **email [support@werecodent.com](mailto:support@werecodent.com)**.

Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.


## Addressing and Repairing Harm

****

If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.

1) Warning
1) Event: A violation involving a single incident or series of incidents.
2) Consequence: A private, written warning from the Community Moderators.
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
2) Temporarily Limited Activities
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
3) Temporary Suspension
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
4) Permanent Ban
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
3) Repair: There is no possible repair in cases of this severity.

This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.


## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.


## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).

Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)

For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
109 changes: 109 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Contributing

Thank you for your interest in contributing.

Please first discuss the change you wish to make via issue/request, email, or any other method with the owners of this repository before making changes. Failure to do so will likely lead to a declined pull request regardless of quality.

Make sure to refer to and follow the [code of conduct](CODE_OF_CONDUCT.md).

## Quality Requirements

* No AI-generated LLM code contributions.
* Digitally signed (see DCO below).
* 100% test coverage.
* Proper comments.
* Updated documentation.
* Follow the project code style.
* No #region.

Pull requests will be reviewed thoroughly to maintain project quality.

Note the ban on LLM-generated code. Developers do not have the right to submit LLM-generated code because that code can be incompatibly copyrighted or licensed elsewhere. Review the Developer Certificate of Origin adherence requirements below.

## Mac Environment Recommended Setup

1) Install Command Line Developer Tools via the Terminal:
A) Check if installed: ‘xcode-select -p’
B) If not, run: ‘code-select —install’
C) Verify git works: ‘git —version’
2) Install [VS Code](https://code.visualstudio.com/docs/setup/mac) for development.
3) Install [Google Chrome](https://www.google.com/chrome) for debugging.
4) Clone the repository in the editor, then:
A) Install all recommended extensions for the project.
B) Follow all prompts for signing in/downloads.
C) To see build options, run from terminal: "./build/run.sh --help"
D) Verify project state by running from terminal: "./build/run.sh test"

## Linux Environment Recommended Setup

1) Install packages for:
A) [.NET frameworks](https://dotnet.microsoft.com/download)
B) [Mono](https://www.mono-project.com/download/stable/#download-lin)
C) [VS Code](https://code.visualstudio.com/docs/setup/linux)
2) Install [Google Chrome](https://www.google.com/chrome) for debugging.
3) Clone the repository in the editor, then:
A) Install all recommended extensions for the project.
B) Run from terminal: "chmod +x ./build/run.sh"
C) To see build options, run from terminal: "./build/run.sh --help"
D) Verify project state by running from terminal: "./build/run.sh test"

## Windows Environment Optional Setup

VS Code is still recommended (see above setups), but VS Community may be utilized instead:

1) Install [VS Community](https://visualstudio.microsoft.com/vs/community) for development.
2) Clone the repository locally.
3) To see build options, run from cmd prompt: "./build/run.cmd --help"
4) Verify project state by running from cmd prompt: "./build/run.cmd test"

# Git & GPG Quick Setup Example

Set the following git configuration settings, replacing [xxx] with valid personal values:

1) git config --global user.name "[xxx]"
2) git config --global user.email "[xxx]@users.noreply.github.com"
3) git config --global user.signingKey [xxx]
4) git config --global tag.gpgSign true
5) git config --global commit.gpgSign true
6) git config --global push.gpgSign "if-asked"

Read more about GPG keys in the following section.

## Developer Certificate of Origin (DCO)

To allow contributions to be used by the project, developers must declare that they can and do give rights to use that code. This is done by signing off on commits by appending a message at the end of the commit for all owners in the format:

```
Signed-off-by: FirstName LastName <email@mail.com>
```

This can be accomplished manually or by using -s or --signoff when committing. Github can verify this signature with your GPG key, which you can learn about [here](https://help.github.com/articles/signing-commits-with-gpg/). By signing off your commits to this repository, you're confirming that you've read DCO and agree with it, which can be found at https://developercertificate.org/ or read below:


```
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Report a bug
about: Ask for something to be fixed
title: ''
labels: 'bug'
assignees: ''

---

<!--- Please search issues before creating a new one. --->
<!--- This is just a template, feel free to customize if prudent. --->

## Expected Behavior
<!--- Describe what should happen. --->

## Current Behavior
<!--- Describe what happens instead of the expected behavior. --->

## Possible Solution
<!--- Optional implementation suggestion. --->

## Steps to Reproduce
<!--- Provide for bugs. Links to examples can be helpful. --->
1.
2.

## Additional Information
<!--- Any other context about the problem here. --->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Contact us via email
url: mailto:support@werecodent.com
about: Communicate privately if necessary
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Request a feature
about: Suggest an idea or want
title: ''
labels: 'enhancement'
assignees: ''

---

<!--- Please search issues before creating a new one. --->
<!--- This is just a template, feel free to customize if prudent. --->

## Wanted Behavior
<!--- Describe the wanted feature. --->

## Possible Solution
<!--- Optional implementation suggestion. --->

## Additional Information
<!--- For example, why do you want the feature? --->
Loading