Skip to content

Commit 8ba668a

Browse files
committed
[Tech] Initial code upload
1 parent 61631d5 commit 8ba668a

File tree

126 files changed

+12475
-281
lines changed

Some content is hidden

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

126 files changed

+12475
-281
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
ij_wrap_on_typing = false
12+
13+
[*.java]
14+
ij_java_class_count_to_use_import_on_demand = 999
15+
ij_java_names_count_to_use_import_on_demand = 999
16+
ij_java_doc_add_blank_line_after_description = false
17+
ij_java_blank_lines_around_method = 1
18+
ij_java_blank_lines_around_method_in_interface = 1
19+
20+
[*.js]
21+
ij_javascript_blank_lines_around_method = 0
22+
ij_javascript_blank_lines_around_class = 0
23+
ij_javascript_keep_simple_methods_in_one_line = true
24+
25+
[*.json]
26+
indent_size = 2

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.gitignore

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
pom.xml.next
7+
release.properties
8+
dependency-reduced-pom.xml
9+
buildNumber.properties
10+
.mvn/timing.properties
11+
12+
# IntelliJ
13+
.idea/
14+
excluded/
15+
*.iml
16+
17+
# Eclipse
18+
*.pydevproject
19+
.metadata
20+
.gradle
21+
bin/
22+
tmp/
23+
*.tmp
24+
*.bak
25+
*.swp
26+
*~.nib
27+
local.properties
28+
.settings/
29+
.loadpath
30+
31+
# Eclipse Core
32+
.project
33+
34+
# Locally stored "Eclipse launch configurations"
35+
*.launch
36+
37+
# External tool builders
38+
.externalToolBuilders/
39+
40+
# CDT-specific
41+
.cproject
42+
43+
# Java
44+
*.class
45+
46+
# Java annotation processor (APT)
47+
.factorypath
48+
49+
# JDT-specific (Eclipse Java Development Tools)
50+
.classpath
51+
52+
# PDT-specific
53+
.buildpath
54+
55+
# sbteclipse plugin
56+
.target
57+
58+
# TeXlipse plugin
59+
.texlipse
60+
61+
# Mobile Tools for Java (J2ME)
62+
.mtj.tmp/
63+
64+
# Package Files
65+
*.jar
66+
*.war
67+
*.ear
68+
*.zip
69+
70+
# Virtual machine crash logs
71+
hs_err_pid*
72+
73+
# Build reports
74+
75+
it.tests/build
76+
77+
# Supplementary folders
78+
graphics/
79+
80+
# Vault
81+
.vlt
82+
83+
# UI
84+
node_modules/

CLA.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Contributor License Agreement
22

3-
Thank you for your interest in contributing to the **`PUT YOUR SOLUTION NAME`** (“Material) by Exadel, Inc. ("We" or "Us"). The present Contributor License Agreement (CLA”) is for your protection as a Contributor as well as the protection of Us; it does not change your rights to use your own Contributions for any other purpose.
3+
Thank you for your interest in contributing to the EToolbox AnyDiff ("Material") by Exadel, Inc. ("We" or "Us"). The present Contributor License Agreement ("CLA") is for your protection as a Contributor as well as the protection of Us; it does not change your rights to use your own Contributions for any other purpose.
44

55
You must agree to the terms of this CLA before making a Contribution to the Material. This CLA covers any and all Contributions that You, now or in the future, submit to the Material. This CLA shall come into effect upon Your acceptance of its terms and conditions.
66

77
## 1. Definitions
8-
a. "You" means the individual Сopyright owner who Submits a Contribution to Us.
8+
a. "You" means the individual Copyright owner who Submits a Contribution to Us.
99

10-
b. "Contribution" means source code and any other copyrightable materials Submitted by you to Us, including any associated comments and documentation.
10+
b. "Contribution" means source code and any other copyrightable materials submitted by you to Us, including any associated comments and documentation.
1111

1212
c. "Copyright" means all rights protecting works of authorship, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence.
1313

@@ -48,6 +48,6 @@ To the maximum extent permitted by applicable law, in no event will You or We be
4848

4949
You agree that this Material and Contributions to it are public and that a record of the Contribution (including all personal information you submit with it) is maintained indefinitely and may be redistributed consistent with this Material, compliance with the open source license(s) involved, and maintenance of authorship attribution.
5050

51-
## 11. Miscellaneous
51+
## 10. Miscellaneous
5252

5353
This CLA is the entire agreement between the parties and supersedes any and all prior agreements, understandings or communications, written or oral, between the parties relating to the subject matter hereof. You acknowledge that We are not obligated to use your Contribution as part of the Material distributed by Us and may make the decision to include any Contribution as We believe is appropriate.

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 79 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,95 @@
1-
# Contributing to {{{SOLUTION_NAME}}}
2-
Contributions are welcomed and greatly appreciated. We want to make contributing to this project as easy and transparent as possible, whether it's:
3-
- Reporting a bug
4-
- Proposing new features
5-
- Discussing the current state of the code
6-
- Submitting a fix or solutions
7-
- Becoming a maintainer
1+
# Contributing to EToolbox AnyDiff
2+
Contributions to EToolbox AnyDiff are welcomed and greatly appreciated. We want to make contributing to this project as easy and transparent as possible, whether it is:
3+
- Reporting a bug;
4+
- Proposing new features;
5+
- Discussing the current state of the code;
6+
- Submitting a fix or solutions;
7+
- Becoming a maintainer.
88

99
## We develop with Github
10-
We use github to host code, to track issues and feature requests, as well as accept pull requests.
10+
We use Github to host code, track issues, accumulate feature requests, review and accept pull requests.
1111

1212
## We use Github Flow
1313
All code changes happen through Pull Requests.
1414

15-
Pull requests are the best way to propose changes to the codebase (please follow this guid [Github Flow](https://guides.github.com/introduction/flow/index.html)).
15+
Pull requests are the best way to propose changes to the codebase (please follow this guide [Github Flow](https://guides.github.com/introduction/flow/index.html)).
1616

1717
We actively welcome your pull requests:
18-
1. Fork the repo and create your branch from `master`.
19-
2. If you've added code that should be tested, add tests.
20-
3. If you've changed APIs, update the documentation.
21-
4. Ensure the test suite passes.
18+
1. Fork the repo and create your branch from `develop`.
19+
2. Do code changes. Whenever you create new files, add the "Licenced under the Apache Licence..." header (use any of the existing files to copy the full header). Whenever you create new public or package-level methods, add Javadoc / JSDoc. Alter existing Javadoc / JSDoc if you change a method's signature.
20+
3. If you've added code that should be tested, add unit tests under the _test_ folder of the respective module. Make sure that the tests pass.
21+
4. If your code covers the features that cannot be verified without live connectivity to an AEM server or a 3rd party service, add an integration test under the _it.tests_ module. Make sure that the tests pass.
2222
5. Make sure your code lints.
23-
6. Issue that pull request!
23+
6. Issue the pull request.
2424

25-
After creating your first contributing PR you will be requested to sign our Contributor License Agreement by commenting your PR with a special message.
25+
#### Procedural pull request questions
2626

27-
## Any contributions you make will be under the {{{SOLUTION_LICENSE}}} License
28-
In short, when you submit code changes, your submissions are understood to be under the same {{{SOLUTION_LICENSE}}} that covers the project. Feel free to contact the maintainers if that's a concern.
27+
Every pull request is dedicated to a single Github issue. Every issue has a tracking number like `EAD-333`.
2928

30-
## Report bugs using Github's [issues](https://github.com/{{{project}}}/issues)
31-
We use GitHub issues to track public bugs.
32-
Report a bug by opening a new issue
29+
A branch for the pull request must be named in the format `bugfix/EAD-333` or `feature/EAD-333` where the part before the slash is the kind of PR (reflecting a bug or a feature request, respectively), and the part after the slash in the tracking number.
3330

34-
## Write bug reports with detail
35-
[This is an template of bug report](https://github.com/exadel-inc/repository-template/blob/main/.github/ISSUE_TEMPLATE/bug_report.md)
31+
A pull request's title must start with the tracking number in square brackets; then comes a brief but detailed description of what is done in this PR like `[EAD-333] Fixed NPE when saving file to a removable media`.
3632

37-
## Use a Consistent Coding Style
33+
A more verbose description in the "description" section is optional but welcomed. You can assign labels from the provided set, such as `bug`, `enhancement`, `documentation`, etc.
3834

39-
* 2 spaces for indentation rather than tabs
40-
* You can try running `npm run lint` for style unification
41-
* Add code style files
35+
Every pull request consists of one or more commits. Commit messages must be presented in the same format as the pull request title. E.g., the following 3 commits: `[EAD-333] Implemented the NPE fix... [EAD-333] Altered Javadoc for the affected method... [EAD-333] Added a unit test for the NPE fix`.
4236

43-
## Links to external documentation, mailing lists, or a code of conduct.
44-
## Community and behavioral expectations.
37+
## Licensing
38+
Any contributions you make are understood to be under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) that covers the whole project. Feel free to contact the maintainers if that's a concern.
39+
40+
After creating your first pull request, you will be asked to sign our [Contributor License Agreement](../../Java/etoolbox-anydiff/CLA.md) by commenting on your PR with a special message.
41+
42+
## Bug reporting
43+
We use Github's [issues](https://github.com/exadel-inc/etoolbox-authoring-kit/issues) to track public bugs.
44+
Report a bug by opening a new issue.
45+
46+
#### Write bug reports with detail
47+
[This is an template of bug report](https://github.com/exadel-inc/repository-template/blob/main/.github/ISSUE_TEMPLATE/bug_report.md).
48+
49+
## Use a Compliant and Consistent Coding Style
50+
51+
#### For POM files
52+
53+
* We place dependencies in the alphabetic order of their `groupId`-s except for the `uber-jar` that comes last to allow overlaying bundled dependencies.
54+
* Use `dependencyManagement` / `pluginManagement` sections of the main POM to specify the common requisites, scope, and config values of dependencies. Override them in a dependent POM file only if necessary.
55+
56+
#### For Java code
57+
58+
* We stick to the [Code Conventions for the Java Programming Language](https://www.oracle.com/java/technologies/javase/codeconventions-contents.html) and also to the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) in essential parts.
59+
* We use 4 spaces for indentation rather than tabs.
60+
* Every import is a separate line, no wildcard imports.
61+
* Avoid static imports (like constants, etc.).
62+
* Give meaningful names to classes, methods, and variables.
63+
* Avoid long lines. No line should exceed 150 characters. Split lengthy lines where appropriate (between method arguments, before ternary operators, etc.).
64+
* Split lengthy methods into smaller parts. A method body must not exceed 20-25 lines.
65+
* Avoid introducing multi-line lambdas.
66+
* Observe the proper sequence of declarations: static variables (constants), then instance variables, then constructors, then instance methods, then static methods, then static nested classes.
67+
* Observe the proper sequence of visibility modifiers: public, then protected, then package-private, then private; public static, then package-private static, etc. You may place a private method immediately after the preceding public if called from this public as a secondary routine.
68+
* Avoid excessive visibility of classes or class member. E.g., do not make a class `public` if it is only called from other classes within this very package. In a public class, do not make a method `public` unless it will be called from a class residing in another package.
69+
* Declare methods that do not have a context (neither read nor mutate the instance fields of a class) as `static`.
70+
* Do not create methods with number of parameters greater than 4.
71+
* Use constants: no "magic" numbers and literals.
72+
* Add `try-catch` blocks to reduce the risk of code termination. Never ignore caught exceptions.
73+
* When unsure, follow the style of the existing code files.
74+
75+
You can use the [.editorconfig file](https://github.com/exadel-inc/etoolbox-authoring-kit/blob/master/.editorconfig) to plug in you IDE.
76+
77+
#### For JavaScript / CSS / LESS code
78+
79+
* Use the predefined [eslint rules](https://github.com/exadel-inc/etoolbox-authoring-kit/blob/master/ui.apps/.eslintrc.json) to verify code with an IDE such as IntelliJ.
80+
* The rules are automatically applied via a Github workflow when you create or modify a pull request.
81+
* When unsure, follow the style of the existing code files.
82+
83+
#### For XML markup files
84+
85+
* Use proper indentation.
86+
* Split long lines into smaller ones by attributes.
87+
* When unsure, follow the style of the existing code files.
88+
89+
## Community and behavioral expectations
90+
91+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
92+
93+
We expect contributors, reviewers, and participants to express their opinions in a friendly, polite, and clear manner, raise and address issues in most precise, explaining and accurate sentences.
94+
95+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

0 commit comments

Comments
 (0)