Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 17c8a49

Browse files
committed
Initial Commit
0 parents  commit 17c8a49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5993
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Bug report
2+
description: Something is not working as expected.
3+
title: Description of the bug
4+
labels: bug
5+
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Describe the bug
10+
description: >-
11+
A clear and concise description of what the bug is.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: To Reproduce
18+
description: >-
19+
Steps to reproduce the behavior.
20+
placeholder: |
21+
1. Go to '...'
22+
2. Click on '....'
23+
3. Scroll down to '....'
24+
4. See error
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
attributes:
30+
label: Expected behavior
31+
description: >-
32+
A clear and concise description of what you expected to happen.
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
attributes:
38+
label: Additional context
39+
description: >-
40+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Components request
2+
description: Suggest an idea for a new component
3+
title: Description of the component request
4+
labels: enhancement
5+
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Why would you like to add a new component?
10+
placeholder: >-
11+
A clear and concise description of why the component should be added.
12+
validations:
13+
required: false
14+
15+
- type: textarea
16+
attributes:
17+
label: Name the native widgets.
18+
placeholder: >-
19+
A list of the native widgets of Gtk/Libadwaita or AppKit, if you know them.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
attributes:
25+
label: Describe your idea for the implementation.
26+
placeholder: >-
27+
What could the implementation be like in Dvandva?
28+
validations:
29+
required: false
30+
31+
- type: textarea
32+
attributes:
33+
label: Additional context
34+
placeholder: >-
35+
Add any other context about the component request here.
36+
validations:
37+
required: false
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: Description of the feature request
4+
labels: enhancement
5+
6+
body:
7+
- type: input
8+
attributes:
9+
label: Is your feature request related to a problem? Please describe.
10+
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
validations:
12+
required: false
13+
14+
- type: textarea
15+
attributes:
16+
label: Describe the solution you'd like
17+
placeholder: >-
18+
A clear and concise description of what you want to happen.
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
attributes:
24+
label: Describe alternatives you've considered
25+
placeholder: >-
26+
A clear and concise description of any alternative solutions or features you've considered.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
attributes:
32+
label: Additional context
33+
placeholder: >-
34+
Add any other context or screenshots about the feature request here.
35+
validations:
36+
required: true

.github/PULL_REQUEST_TEMPLATE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Steps
2+
- [ ] Add your name or username and a link to your GitHub profile into the [Contributors.md][1] file.
3+
- [ ] Build the project on your machine. If it does not compile, fix the errors.
4+
- [ ] Describe the purpose and approach of your pull request below.
5+
- [ ] Submit the pull request. Thank you very much for your contribution!
6+
7+
## Purpose
8+
_Describe the problem or feature._
9+
_If there is a related issue, add the link._
10+
11+
## Approach
12+
_Describe how this pull request solves the problem or adds the feature._
13+
14+
[1]: /Contributors.md

.github/workflows/swiftlint.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/swiftlint.yml'
7+
- '.swiftlint.yml'
8+
- '**/*.swift'
9+
pull_request:
10+
paths:
11+
- '.github/workflows/swiftlint.yml'
12+
- '.swiftlint.yml'
13+
- '**/*.swift'
14+
workflow_dispatch:
15+
paths:
16+
- '.github/workflows/swiftlint.yml'
17+
- '.swiftlint.yml'
18+
- '**/*.swift'
19+
20+
jobs:
21+
SwiftLint:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v1
25+
- name: SwiftLint
26+
uses: norio-nomura/[email protected]
27+
with:
28+
args: --strict
29+
env:
30+
WORKING_DIRECTORY: Source

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
/.swiftpm
8+
.netrc
9+
/Package.resolved
10+
.Ulysses-Group.plist

.swiftlint.yml

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Opt-In Rules
2+
opt_in_rules:
3+
- anonymous_argument_in_multiline_closure
4+
- array_init
5+
- attributes
6+
- closure_body_length
7+
- closure_end_indentation
8+
- closure_spacing
9+
- collection_alignment
10+
- comma_inheritance
11+
- conditional_returns_on_newline
12+
- contains_over_filter_count
13+
- contains_over_filter_is_empty
14+
- contains_over_first_not_nil
15+
- contains_over_range_nil_comparison
16+
- convenience_type
17+
- discouraged_none_name
18+
- discouraged_object_literal
19+
- discouraged_optional_boolean
20+
- discouraged_optional_collection
21+
- empty_collection_literal
22+
- empty_count
23+
- empty_string
24+
- enum_case_associated_values_count
25+
- explicit_init
26+
- fallthrough
27+
- file_header
28+
- file_name
29+
- file_name_no_space
30+
- first_where
31+
- flatmap_over_map_reduce
32+
- force_unwrapping
33+
- function_default_parameter_at_end
34+
- identical_operands
35+
- implicit_return
36+
- implicitly_unwrapped_optional
37+
- joined_default_parameter
38+
- last_where
39+
- legacy_multiple
40+
- let_var_whitespace
41+
- literal_expression_end_indentation
42+
- local_doc_comment
43+
- lower_acl_than_parent
44+
- missing_docs
45+
- modifier_order
46+
- multiline_arguments
47+
- multiline_arguments_brackets
48+
- multiline_function_chains
49+
- multiline_literal_brackets
50+
- multiline_parameters
51+
- multiline_parameters_brackets
52+
- no_extension_access_modifier
53+
- no_grouping_extension
54+
- no_magic_numbers
55+
- number_separator
56+
- operator_usage_whitespace
57+
- optional_enum_case_matching
58+
- prefer_self_in_static_references
59+
- prefer_self_type_over_type_of_self
60+
- prefer_zero_over_explicit_init
61+
- prohibited_interface_builder
62+
- redundant_nil_coalescing
63+
- redundant_type_annotation
64+
- return_value_from_void_function
65+
- shorthand_optional_binding
66+
- sorted_first_last
67+
- sorted_imports
68+
- static_operator
69+
- strict_fileprivate
70+
- switch_case_on_newline
71+
- toggle_bool
72+
- trailing_closure
73+
- type_contents_order
74+
- unneeded_parentheses_in_closure_argument
75+
- yoda_condition
76+
77+
# Disabled Rules
78+
disabled_rules:
79+
- block_based_kvo
80+
- class_delegate_protocol
81+
- dynamic_inline
82+
- is_disjoint
83+
- no_fallthrough_only
84+
- notification_center_detachment
85+
- ns_number_init_as_function_reference
86+
- nsobject_prefer_isequal
87+
- private_over_fileprivate
88+
- redundant_objc_attribute
89+
- self_in_property_initialization
90+
- todo
91+
- unavailable_condition
92+
- valid_ibinspectable
93+
- xctfail_message
94+
95+
# Custom Rules
96+
custom_rules:
97+
github_issue:
98+
name: 'GitHub Issue'
99+
regex: '//.(TODO|FIXME):.(?!.*(https://github\.com/david-swift/Dvandva/issues/\d))'
100+
message: 'The related GitHub issue must be included in a TODO or FIXME.'
101+
severity: warning
102+
103+
fatal_error:
104+
name: 'Fatal Error'
105+
regex: 'fatalError.*\(.*\)'
106+
message: 'Fatal error should not be used.'
107+
severity: error
108+
109+
enum_case_parameter:
110+
name: 'Enum Case Parameter'
111+
regex: 'case [a-zA-Z0-9]*\([a-zA-Z0-9\.<>?,\n\t =]+\)'
112+
message: 'The associated values of an enum case should have parameters.'
113+
severity: warning
114+
115+
tab:
116+
name: 'Whitespaces Instead of Tab'
117+
regex: '\t'
118+
message: 'Spaces should be used instead of tabs.'
119+
severity: warning
120+
121+
# Thanks to the creator of the SwiftLint rule
122+
# "empty_first_line"
123+
# https://github.com/coteditor/CotEditor/blob/main/.swiftlint.yml
124+
# in the GitHub repository
125+
# "CotEditor"
126+
# https://github.com/coteditor/CotEditor
127+
empty_first_line:
128+
name: 'Empty First Line'
129+
regex: '(^[ a-zA-Z ]*(?:protocol|extension|class|struct) (?!(?:var|let))[ a-zA-Z:]*\{\n *\S+)'
130+
message: 'There should be an empty line after a declaration'
131+
severity: error
132+
133+
# Analyzer Rules
134+
analyzer_rules:
135+
- unused_declaration
136+
- unused_import
137+
138+
# Options
139+
file_header:
140+
required_pattern: '(// swift-tools-version: .+)?//\n// .*.swift\n// Dvandva\n//\n// Created by .* on .*\.(\n// Edited by (.*,)+\.)*\n(\n// Thanks to .* for the .*:\n// ".*"\n// https://.* \(\d\d.\d\d.\d\d\))*//\n'
141+
missing_docs:
142+
warning: [internal, private]
143+
error: [open, public]
144+
excludes_extensions: false
145+
excludes_inherited_types: false
146+
type_contents_order:
147+
order:
148+
- case
149+
- type_alias
150+
- associated_type
151+
- type_property
152+
- instance_property
153+
- ib_inspectable
154+
- ib_outlet
155+
- subscript
156+
- initializer
157+
- deinitializer
158+
- subtype
159+
- type_method
160+
- view_life_cycle_method
161+
- ib_action
162+
- other_method

Bundler.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[apps.Test]
2+
product = 'Test'
3+
version = '0.1.0'

CONTRIBUTING.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributing
2+
3+
Thank you very much for taking the time for contributing to this project.
4+
5+
## Report a Bug
6+
Just open a new issue on GitHub and describe the bug. It helps if your description is detailed. Thank you very much for your contribution!
7+
8+
## Suggest a New Feature
9+
Just open a new issue on GitHub and describe the idea. Thank you very much for your contribution!
10+
11+
### Suggest a New Component
12+
If you want to add a component, just open an issue.
13+
14+
## Pull Requests
15+
I am happy for every pull request, you do not have to follow these guidelines. However, it might help you to understand the project structure and make it easier for me to merge your pull request. Thank you very much for your contribution!
16+
17+
### 1. Fork & Clone this Project
18+
Start by clicking on the `Fork` button at the top of the page. Then, clone this repository to your computer.
19+
20+
### 2. Open the Project
21+
Open the project folder in GNOME Builder, Xcode or another IDE.
22+
23+
### 3. Understand the Project Structure
24+
- The `README.md` file contains a description of the app or package.
25+
- The `Contributors.md` file contains the names or user names of all the contributors with a link to their GitHub profile.
26+
- The `LICENSE.md` contains an GPL-3.0 license.
27+
- `CONTRIBUTING.md` is this file.
28+
- `Bundler.toml` contains information for the test app on macOS.
29+
- Directory `Icons` that contains PNG and PXD (Pixelmator Pro) files for the images used in the app and guides.
30+
- Directory `Documentation` that contains the documentation generated with [SourceDocs][1].
31+
- `Sources` contains the source code of the project.
32+
- `Dvandva` contains the source code of the project.
33+
- `Extensions` contains extensions for existing types.
34+
- `Swift` contains representations of simple types, often enumerations, in Swift.
35+
- `Widgets` contains the actual widgets.
36+
- `Tests` contains an example application.
37+
38+
### 4. Edit the Code
39+
Edit the code. If you add a new type, add documentation in the code.
40+
41+
### 5. Commit to the Fork
42+
Commit and push the fork.
43+
44+
### 6. Pull Request
45+
Open GitHub to submit a pull request. Thank you very much for your contribution!
46+
47+
[1]: https://github.com/SourceDocs/SourceDocs

Contributors.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributors
2+
3+
- [david-swift](https://github.com/david-swift)

0 commit comments

Comments
 (0)