Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename ecocode to creedengo #55

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
17 changes: 9 additions & 8 deletions doc/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Code of Conduct - EcoCode
# Code of Conduct - Creedengo

- [Our Pledge](#our-pledge)
- [Our Standards](#our-standards)
- [Our Responsibilities](#our-responsibilities)
- [Scope](#scope)
- [Enforcement](#enforcement)
- [Attribution](#attribution)
- [Code of Conduct - Creedengo](#code-of-conduct---creedengo)
Lmgrto marked this conversation as resolved.
Show resolved Hide resolved
- [Our Pledge](#our-pledge)
- [Our Standards](#our-standards)
- [Our Responsibilities](#our-responsibilities)
- [Scope](#scope)
- [Enforcement](#enforcement)
- [Attribution](#attribution)

## Our Pledge

Expand Down Expand Up @@ -63,7 +64,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement with [form contact](https://www.ecocode.io/contact).
reported to the community leaders responsible for enforcement with [form contact](https://green-code-initiative.org/).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
79 changes: 40 additions & 39 deletions doc/CODE_STYLE.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
# Code Style Guide - EcoCode

- [Introduction](#introduction)
- [Source File Basics](#source-file-basics)
- [File encoding: UTF-8](#file-encoding-utf-8)
- [Indentation](#indentation)
- [Source file structure](#source-file-structure)
- [Import statements](#import-statements)
- [Java source file organization](#java-source-file-organization)
- [Formatting](#formatting)
- [Braces](#braces)
- [Block-like constructs: K\&R style](#block-like-constructs-kr-style)
- [Line wrapping](#line-wrapping)
- [Blank Lines](#blank-lines)
- [Class declaration](#class-declaration)
- [Naming](#naming)
- [Constant names](#constant-names)
- [Variable names](#variable-names)
- [Programming Practices](#programming-practices)
- [File history](#file-history)
- [Organization of setter methods](#organization-of-setter-methods)
- [Ternary Operator](#ternary-operator)
- [Null Checks](#null-checks)
- [Use of @Override](#use-of-override)
- [Utility classes](#utility-classes)
- [Field and method references](#field-and-method-references)
- [Local variable type inference](#local-variable-type-inference)
- [Some rules from experience](#some-rules-from-experience)
- [Protections against ClassCast exceptions](#protections-against-classcast-exceptions)
- [Javadoc](#javadoc)
- [Javadoc formatting](#javadoc-formatting)
- [Tests](#tests)
- [Testing Framework](#testing-framework)
- [Naming](#naming-1)
- [Assertions](#assertions)
- [Mocking](#mocking)
- [Some rules from experience](#some-rules-from-experience-1)
- [Unit tests](#unit-tests)
# Code Style Guide - Creedengo

- [Code Style Guide - Creedengo](#code-style-guide---creedengo)
Lmgrto marked this conversation as resolved.
Show resolved Hide resolved
- [Introduction](#introduction)
- [Source File Basics](#source-file-basics)
- [File encoding: UTF-8](#file-encoding-utf-8)
- [Indentation](#indentation)
- [Source file structure](#source-file-structure)
- [Import statements](#import-statements)
- [Java source file organization](#java-source-file-organization)
- [Formatting](#formatting)
- [Braces](#braces)
- [Block-like constructs: K\&R style](#block-like-constructs-kr-style)
- [Line wrapping](#line-wrapping)
- [Blank Lines](#blank-lines)
- [Class declaration](#class-declaration)
- [Naming](#naming)
- [Constant names](#constant-names)
- [Variable names](#variable-names)
- [Programming Practices](#programming-practices)
- [File history](#file-history)
- [Organization of setter methods](#organization-of-setter-methods)
- [Ternary Operator](#ternary-operator)
- [Null Checks](#null-checks)
- [Use of @Override](#use-of-override)
- [Utility classes](#utility-classes)
- [Field and method references](#field-and-method-references)
- [Local variable type inference](#local-variable-type-inference)
- [Some rules from experience](#some-rules-from-experience)
- [Protections against ClassCast exceptions](#protections-against-classcast-exceptions)
- [Javadoc](#javadoc)
- [Javadoc formatting](#javadoc-formatting)
- [Tests](#tests)
- [Testing Framework](#testing-framework)
- [Naming](#naming-1)
- [Assertions](#assertions)
- [Mocking](#mocking)
- [Some rules from experience](#some-rules-from-experience-1)
- [Unit tests](#unit-tests)

## Introduction

Expand Down Expand Up @@ -255,7 +256,7 @@ The use of `var` for variable declarations (_local variable type inference_) is

#### Protections against ClassCast exceptions

From experience with issue [#42](https://github.com/green-code-initiative/ecoCode/issues/42), when an exception occurs during Sonar analysis with maven command, the consequence is a crash. If this phase is launched in a CI/CD pipeline, this crash will block the pipeline. Thus, our plugins will be deleted until next corrections.
From experience with issue [#42](https://github.com/green-code-initiative/creedengo-rules-specifications/issues/42), when an exception occurs during Sonar analysis with maven command, the consequence is a crash. If this phase is launched in a CI/CD pipeline, this crash will block the pipeline. Thus, our plugins will be deleted until next corrections.

Please, make a maximum of controls in the code to avoid ClassCast exceptions and thus, avoid uninstalling our plugin from SonarQube.

Expand Down
8 changes: 4 additions & 4 deletions doc/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing - EcoCode
# Contributing - Creedengo

- [Code of Conduct](#code-of-conduct)
- [I Have a Question](#i-have-a-question)
Expand Down Expand Up @@ -88,7 +88,7 @@ When you create an issue, a template is given to you to help you filling it.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Ecocode repositories, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
This section guides you through submitting an enhancement suggestion for creedengo repositories, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

#### Before Submitting an Enhancement

Expand All @@ -105,14 +105,14 @@ Enhancement suggestions are tracked as GitHub issues.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and ["silentcast" tool](https://github.com/colinkeenan/silentcast) or ["byzanz" tool](https://github.com/GNOME/byzanz) on Linux.
- **Explain why this enhancement would be useful** to most Ecocode users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- **Explain why this enhancement would be useful** to most creedengo users. You may also want to point out the other projects that solved it better and which could serve as inspiration.

When you create an issue, a template is given to you.

### How Do I Suggest a New Rule ?

- first of all, check if rule isn't existing yet (in `RULES.md` or in Sonarqube native rules list)
- if it isn't exist, create a new issue in `ecocode` repository : choose `new rule template`
- if it isn't exist, create a new issue in `creedengo` repository : choose `new rule template`
Lmgrto marked this conversation as resolved.
Show resolved Hide resolved
- fill the template and submit issue

### Your First Code Contribution
Expand Down
14 changes: 7 additions & 7 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Frequently Ask Questions
---

## I'm using default `Sonar Way` rules (with default `Sonar Way` profile). When I install one of ecoCode plugins (ex : `ecoCode-java plugin`), are new ecoCode rules installed ? and how does the plugin do this ?
## I'm using default `Sonar Way` rules (with default `Sonar Way` profile). When I install one of creedengo plugins (ex : `creedengo-java plugin`), are new creedengo rules installed ? and how does the plugin do this ?

> When an ecoCode plugin is installed by the marketplace, the rules are immediately available on SonarQube. You can find them if you go to "rules" tab, and select rules with tag `ecocode`.
> When an creedengo plugin is installed by the marketplace, the rules are immediately available on SonarQube. You can find them if you go to "rules" tab, and select rules with tag `creedengo`.
>
> But by default, ecoCode rules aren't set to an existing Sonarqube profile.
> But by default, creedengo rules aren't set to an existing Sonarqube profile.
>
> If you want to use ecoCode rules (for one language for example), you have many ways to configure it :
> 1. create a new profile, then select all wanted rules (ecoCode rules or not) for that new profile, and finally use this new profile as "default" profile for the selected language (or set a few projects to this new profile).
> 2. use our script to create ths kind of profile (explanation here : https://github.com/green-code-initiative/ecoCode-common/blob/main/doc/HOWTO.md#initialize-default-profiles-for-ecocode-plugins) ... WARNING : the new profile created will be set as the default profile for your language !
> 3. update one of your current profiles you use with new available ecoCode rules
> If you want to use creedengo rules (for one language for example), you have many ways to configure it :
> 1. create a new profile, then select all wanted rules (creedengo rules or not) for that new profile, and finally use this new profile as "default" profile for the selected language (or set a few projects to this new profile).
> 2. use our script to create ths kind of profile (explanation here : https://github.com/green-code-initiative/creedengo-common/blob/main/doc/HOWTO.md#initialize-default-profiles-for-creedengo-plugins) ... WARNING : the new profile created will be set as the default profile for your language !
> 3. update one of your current profiles you use with new available creedengo rules
Loading