Skip to content

Commit 67fd9d3

Browse files
authored
Initial commit
0 parents  commit 67fd9d3

19 files changed

+2297
-0
lines changed

.editorconfig

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Don't use tabs for indentation.
7+
[*]
8+
indent_size = 4
9+
indent_style = space
10+
tab_width = 4
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
guidelines = 120
16+
17+
# Code files
18+
[*.{cs,csx,vb,vbx}]
19+
indent_size = 4
20+
21+
# Xml project files
22+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
23+
indent_size = 2
24+
25+
# Xml config files
26+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
27+
indent_size = 2
28+
29+
# JSON files
30+
[*.json]
31+
indent_size = 2
32+
33+
# JS files
34+
[*.{js,ts,scss,html}]
35+
indent_size = 2
36+
37+
[*.{ts}]
38+
quote_type = single
39+
40+
[*.{scss,yml,csproj}]
41+
indent_size = 2
42+
43+
[*.sln]
44+
indent_style = tab
45+
46+
# Dotnet code style settings:
47+
[*.{cs,vb}]
48+
# Sort using and Import directives with System.* appearing first
49+
dotnet_sort_system_directives_first = true
50+
# Avoid "this." and "Me." if not necessary
51+
dotnet_style_qualification_for_field = false:suggestion
52+
dotnet_style_qualification_for_property = false:suggestion
53+
dotnet_style_qualification_for_method = false:suggestion
54+
dotnet_style_qualification_for_event = false:suggestion
55+
56+
# Use language keywords instead of framework type names for type references
57+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
58+
dotnet_style_predefined_type_for_member_access = true:suggestion
59+
60+
# Suggest more modern language features when available
61+
dotnet_style_object_initializer = true:suggestion
62+
dotnet_style_collection_initializer = true:suggestion
63+
dotnet_style_coalesce_expression = true:suggestion
64+
dotnet_style_null_propagation = true:suggestion
65+
dotnet_style_explicit_tuple_names = true:suggestion
66+
67+
# Prefix private members with underscore
68+
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
69+
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
70+
dotnet_naming_rule.private_members_with_underscore.severity = suggestion
71+
72+
dotnet_naming_symbols.private_fields.applicable_kinds = field
73+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
74+
75+
dotnet_naming_style.prefix_underscore.capitalization = camel_case
76+
dotnet_naming_style.prefix_underscore.required_prefix = _
77+
78+
# Async methods should have "Async" suffix
79+
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
80+
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
81+
dotnet_naming_rule.async_methods_end_in_async.severity = suggestion
82+
83+
dotnet_naming_symbols.any_async_methods.applicable_kinds = method
84+
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
85+
dotnet_naming_symbols.any_async_methods.required_modifiers = async
86+
87+
dotnet_naming_style.end_in_async.required_prefix =
88+
dotnet_naming_style.end_in_async.required_suffix = Async
89+
dotnet_naming_style.end_in_async.capitalization = pascal_case
90+
dotnet_naming_style.end_in_async.word_separator =
91+
92+
# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items.
93+
dotnet_diagnostic.CS0618.severity = suggestion
94+
95+
# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items.
96+
dotnet_diagnostic.CS0612.severity = suggestion
97+
98+
# Remove unnecessary using directives https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005
99+
dotnet_diagnostic.IDE0005.severity = warning
100+
101+
# CSharp code style settings:
102+
[*.cs]
103+
# Prefer "var" everywhere
104+
csharp_style_var_for_built_in_types = true:suggestion
105+
csharp_style_var_when_type_is_apparent = true:suggestion
106+
csharp_style_var_elsewhere = true:suggestion
107+
108+
# Prefer method-like constructs to have a expression-body
109+
csharp_style_expression_bodied_methods = true:none
110+
csharp_style_expression_bodied_constructors = true:none
111+
csharp_style_expression_bodied_operators = true:none
112+
113+
# Prefer property-like constructs to have an expression-body
114+
csharp_style_expression_bodied_properties = true:none
115+
csharp_style_expression_bodied_indexers = true:none
116+
csharp_style_expression_bodied_accessors = true:none
117+
118+
# Suggest more modern language features when available
119+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
120+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
121+
csharp_style_inlined_variable_declaration = true:suggestion
122+
csharp_style_throw_expression = true:suggestion
123+
csharp_style_conditional_delegate_call = true:suggestion
124+
125+
# Newline settings
126+
csharp_new_line_before_open_brace = all
127+
csharp_new_line_before_else = true
128+
csharp_new_line_before_catch = true
129+
csharp_new_line_before_finally = true
130+
csharp_new_line_before_members_in_object_initializers = true
131+
csharp_new_line_before_members_in_anonymous_types = true
132+
133+
# Namespace settings
134+
csharp_style_namespace_declarations = file_scoped:warning
135+
136+
# Switch expression
137+
dotnet_diagnostic.CS8509.severity = error # missing switch case for named enum value
138+
dotnet_diagnostic.CS8524.severity = none # missing switch case for unnamed enum value

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/CODEOWNERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Please sort into logical groups with comment headers. Sort groups in order of specificity.
2+
# For example, default owners should always be the first group.
3+
# Sort lines alphabetically within these groups to avoid accidentally adding duplicates.
4+
#
5+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
6+
7+
# Default file owners.
8+
* @bitwarden/team-leads-eng
9+
10+
# DevOps for Actions and other workflow changes.
11+
.github/workflows @bitwarden/dept-devops

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Requests
4+
url: https://community.bitwarden.com/c/feature-requests/
5+
about: Request new features using the Community Forums. Please search existing feature requests before making a new one.
6+
- name: Bitwarden Community Forums
7+
url: https://community.bitwarden.com
8+
about: Please visit the community forums for general community discussion, support and the development roadmap.
9+
- name: Customer Support
10+
url: https://bitwarden.com/contact/
11+
about: Please contact our customer support for account issues and general customer support.
12+
- name: Security Issues
13+
url: https://hackerone.com/bitwarden
14+
about: We use HackerOne to manage security disclosures.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## 🎟️ Tracking
2+
3+
<!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. -->
4+
5+
## 🚧 Type of change
6+
7+
<!-- Choose those applicable and remove the others. -->
8+
9+
- 🐛 Bug fix
10+
- 🚀 New feature development
11+
- 🧹 Tech debt (refactoring, code cleanup, dependency upgrades, etc.)
12+
- 🤖 Build/deploy pipeline (DevOps)
13+
- 🎂 Other
14+
15+
## 📔 Objective
16+
17+
<!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. -->
18+
19+
## 📋 Code changes
20+
21+
<!-- Explain the changes you've made to each file or major component. This should help the reviewer understand your changes. -->
22+
<!-- Also refer to any related changes or PRs in other repositories. -->
23+
24+
- **file.ext:** Description of what was changed and why.
25+
26+
## 📸 Screenshots
27+
28+
<!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. -->
29+
30+
## ⏰ Reminders before review
31+
32+
- Contributor guidelines followed
33+
- All formatters and local linters executed and passed
34+
- Written new unit and / or integration tests where applicable
35+
- Used internationalization (i18n) for all UI strings
36+
- CI builds passed
37+
- Communicated to DevOps any deployment requirements
38+
- Updated any necessary documentation or informed the documentation team
39+
40+
## 🦮 Reviewer guidelines
41+
42+
<!-- Suggested interactions but feel free to use (or not) as you desire! -->
43+
44+
- 👍 (`:+1:`) or similar for great changes
45+
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
46+
- ❓ (`:question:`) for questions
47+
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
48+
- 🎨 (`:art:`) for suggestions / improvements
49+
- ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention
50+
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt
51+
- ⛏ (`:pick:`) for minor or nitpick changes

.github/renovate.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base",
5+
":combinePatchMinorReleases",
6+
":dependencyDashboard",
7+
":maintainLockFilesWeekly",
8+
":pinAllExceptPeerDependencies",
9+
":prConcurrentLimit10",
10+
":rebaseStalePrs",
11+
"schedule:weekends",
12+
":separateMajorReleases"
13+
],
14+
"enabledManagers": ["cargo", "github-actions", "npm", "nuget"],
15+
"packageRules": [
16+
{
17+
"groupName": "cargo minor",
18+
"matchManagers": ["cargo"],
19+
"matchUpdateTypes": ["minor", "patch"]
20+
},
21+
{
22+
"groupName": "gh minor",
23+
"matchManagers": ["github-actions"],
24+
"matchUpdateTypes": ["minor", "patch"]
25+
},
26+
{
27+
"groupName": "npm minor",
28+
"matchManagers": ["npm"],
29+
"matchUpdateTypes": ["minor", "patch"]
30+
},
31+
{
32+
"groupName": "nuget minor",
33+
"matchManagers": ["nuget"],
34+
"matchUpdateTypes": ["minor", "patch"]
35+
}
36+
]
37+
}

.github/workflows/enforce-labels.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Enforce PR labels
3+
4+
on:
5+
workflow_call:
6+
pull_request:
7+
types: [labeled, unlabeled, opened, edited, synchronize]
8+
jobs:
9+
enforce-label:
10+
name: Enforce Label
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Enforce Label
14+
uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2
15+
with:
16+
BANNED_LABELS: "hold,needs-qa"
17+
BANNED_LABELS_DESCRIPTION: "PRs with the hold or needs-qa labels cannot be merged"

.github/workflows/workflow-linter.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Workflow Linter
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- .github/workflows/**
8+
9+
jobs:
10+
call-workflow:
11+
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@a30e9c3d658dc97c4c2e61ec749fdab64b83386c

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# General
2+
.DS_Store
3+
Thumbs.db
4+
5+
# IDEs and editors
6+
.idea/
7+
.project
8+
.classpath
9+
.c9/
10+
*.launch
11+
.settings/
12+
*.sublime-workspace
13+
14+
# Visual Studio Code
15+
.vscode/*
16+
!.vscode/settings.json
17+
!.vscode/tasks.json
18+
!.vscode/launch.json
19+
!.vscode/extensions.json
20+
.history/*
21+
22+
# Node
23+
node_modules
24+
npm-debug.log

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# How to Contribute
2+
3+
Our [Contributing Guidelines](https://contributing.bitwarden.com/contributing/) are located in our [Contributing Documentation](https://contributing.bitwarden.com/). The documentation also includes recommended tooling, code style tips, and lots of other great information to get you started.

LICENSE.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Source code in this repository is covered by one of two licenses: (i) the
2+
GNU General Public License (GPL) v3.0 (ii) the Bitwarden License v1.0. The
3+
default license throughout the repository is GPL v3.0 unless the header
4+
specifies another license. Bitwarden Licensed code is found only in the
5+
/bitwarden_license directory.
6+
7+
GPL v3.0:
8+
https://github.com/bitwarden/web/blob/master/LICENSE_GPL.txt
9+
10+
Bitwarden License v1.0:
11+
https://github.com/bitwarden/web/blob/master/LICENSE_BITWARDEN.txt
12+
13+
No grant of any rights in the trademarks, service marks, or logos of Bitwarden is
14+
made (except as may be necessary to comply with the notice requirements as
15+
applicable), and use of any Bitwarden trademarks must comply with Bitwarden
16+
Trademark Guidelines
17+
<https://github.com/bitwarden/server/blob/master/TRADEMARK_GUIDELINES.md>.

0 commit comments

Comments
 (0)