Refactor Codacy items

Adds a code quality badge to the readme and refactors some minor issues
to satisfy Codacy.
This commit is contained in:
DigiLive
2025-05-17 12:35:02 +02:00
parent 9aa2c442f0
commit 02caa4dbed
9 changed files with 4799 additions and 33 deletions

View File

@ -5,7 +5,7 @@ Please fill out the following information to help us review your pull request.
--- ---
### Bug Summary ## Bug Summary
Explain why this fix is needed and what problem it solves. Explain why this fix is needed and what problem it solves.
If it relates to an existing issue, please link it. If it relates to an existing issue, please link it.
@ -15,7 +15,7 @@ See [Linking a pull request to an issue](https://docs.github.com/en/issues/track
--- ---
### Motivation and Context ## Motivation and Context
Explain why this bug needs to be fixed and the impact it has on the project or users. Explain why this bug needs to be fixed and the impact it has on the project or users.
@ -23,20 +23,20 @@ Explain why this bug needs to be fixed and the impact it has on the project or u
--- ---
### List of Changes ## List of Changes
[Provide a concise list of the main changes introduced by this pull request to fix the bug.] [Provide a concise list of the main changes introduced by this pull request to fix the bug.]
- ... - ...
### Steps to Reproduce (if not covered in the linked issue) ## Steps to Reproduce (if not covered in the linked issue)
If the steps to reproduce the bug are not clearly outlined in the linked issue, please provide them here: If the steps to reproduce the bug are not clearly outlined in the linked issue, please provide them here:
1. ... 1. ...
2. ... 2. ...
### Expected Behavior (if not covered in the linked issue) ## Expected Behavior (if not covered in the linked issue)
Describe what the expected behavior should have been before the bug occurred. Describe what the expected behavior should have been before the bug occurred.
@ -50,13 +50,13 @@ Describe the actual behavior that occurred due to the bug.
--- ---
### Wiki Updates ## Wiki Updates
[If this bug fix requires any updates to the Wiki, please provide details here.] [If this bug fix requires any updates to the Wiki, please provide details here.]
--- ---
### Agreements ## Agreements
Please confirm the following by inserting an `x` between the brackets: Please confirm the following by inserting an `x` between the brackets:

View File

@ -5,13 +5,13 @@ Please fill out the following information to help us review your pull request.
--- ---
### Feature Summary ## Feature Summary
[Briefly describe the feature you are proposing] [Briefly describe the feature you are proposing]
--- ---
### Motivation and Context ## Motivation and Context
Explain why this feature is needed and what problem it solves. Explain why this feature is needed and what problem it solves.
If it relates to an existing issue, please link it. If it relates to an existing issue, please link it.
@ -21,19 +21,19 @@ See [Linking a pull request to an issue](https://docs.github.com/en/issues/track
--- ---
### List of Changes ## List of Changes
[Provide a concise list of the main changes introduced by this pull request.] [Provide a concise list of the main changes introduced by this pull request.]
- ... - ...
### Wiki Updates ## Wiki Updates
[If this bug feature requires any updates to the Wiki, please provide details here.] [If this bug feature requires any updates to the Wiki, please provide details here.]
--- ---
### Agreements ## Agreements
Please confirm the following by inserting an `x` between the brackets: Please confirm the following by inserting an `x` between the brackets:

View File

@ -5,7 +5,7 @@ Please fill out the following information to help us review your translation cha
--- ---
### Type of Translation Contribution ## Type of Translation Contribution
Please select the type of contribution: Please select the type of contribution:
@ -15,7 +15,7 @@ Please select the type of contribution:
--- ---
### Target Language ## Target Language
Please specify the language you are adding or modifying: Please specify the language you are adding or modifying:
@ -23,7 +23,7 @@ Please specify the language you are adding or modifying:
--- ---
### Motivation and Context ## Motivation and Context
Explain why this translation (addition, fix, or update) is needed. Explain why this translation (addition, fix, or update) is needed.
- For fixes, please describe the original error. - For fixes, please describe the original error.
@ -33,7 +33,7 @@ Explain why this translation (addition, fix, or update) is needed.
--- ---
### Scope of Changes ## Scope of Changes
Please describe the scope of your translation changes. Please describe the scope of your translation changes.
Which parts of the project are affected by these translations? Which parts of the project are affected by these translations?
@ -42,7 +42,7 @@ Which parts of the project are affected by these translations?
--- ---
### List of Changes ## List of Changes
Provide a concise list of the main changes you've made in this pull request. Provide a concise list of the main changes you've made in this pull request.
If it's a large update, you can highlight key areas. If it's a large update, you can highlight key areas.
@ -51,7 +51,7 @@ If it's a large update, you can highlight key areas.
--- ---
### Considerations for Reviewers ## Considerations for Reviewers
Are there any specific areas you would like reviewers to pay extra attention to? Are there any specific areas you would like reviewers to pay extra attention to?
For example, specific terminology, cultural nuances, or consistency with existing translations. For example, specific terminology, cultural nuances, or consistency with existing translations.
@ -60,7 +60,7 @@ For example, specific terminology, cultural nuances, or consistency with existin
--- ---
### Agreements ## Agreements
Please confirm the following: Please confirm the following:

View File

@ -153,7 +153,7 @@ Enhancement suggestions are tracked as [GitHub issues][issuesUrl].
### Code Contribution ### Code Contribution
You can contribute to this project by following the _fork → clone → edit → pull request_ workflow of GitHub. You can contribute to this project by following the *fork → clone → edit → pull request* workflow of GitHub.
#### Prevent changes to the distribution directory #### Prevent changes to the distribution directory

View File

@ -1,7 +1,8 @@
# Mushroom dashboard strategy # Mushroom dashboard strategy
[![release][releaseBadge]][releaseUrl] [![Release][releaseBadge]][releaseUrl]
[![hacs][hacsBadge]][hacsUrl] [![HACS][hacsBadge]][hacsUrl]
[![Codacy][codacyBadge]][codacyUrl]
![Preview GIF](./docs/preview.gif) ![Preview GIF](./docs/preview.gif)
@ -26,10 +27,10 @@ For easy access, separate views are generated for entities which belong to speci
### Features ### Features
- 🛠 Automatically create a dashboard with three lines of YAML. * 🛠 Automatically create a dashboard with three lines of YAML.
- 😍 Built-in Views for device-specific controls. * 😍 Built-in Views for device-specific controls.
- 🎨 Many options to customize to fit your needs. * 🎨 Many options to customize to fit your needs.
- 📈 [Mini graph][miniGraphUrl] cards for sensor entities. * 📈 [Mini graph][miniGraphUrl] cards for sensor entities.
> [!TIP] > [!TIP]
> If you like this package, please star the [project at GitHub][repositoryUrl]! > If you like this package, please star the [project at GitHub][repositoryUrl]!
@ -59,14 +60,18 @@ Visit the [issues][issuesUrl] page.
<!-- Badge References --> <!-- Badge References -->
[hacsBadge]: https://img.shields.io/badge/HACS-Default-blue [codacyBadge]: https://app.codacy.com/project/badge/Grade/24de1e79aea445499917d9acd5ce9e04
[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86 [hacsBadge]: https://img.shields.io/badge/HACS-Default-blue
[releaseBadge]: https://img.shields.io/github/v/tag/digilive/mushroom-strategy?filter=v2.3.2&label=Release [releaseBadge]: https://img.shields.io/github/v/tag/digilive/mushroom-strategy?filter=v2.3.2&label=Release
[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86
<!-- Repository References --> <!-- Repository References -->
[codacyUrl]: https://app.codacy.com/gh/DigiLive/mushroom-strategy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
[repositoryUrl]: https://github.com/DigiLive/mushroom-strategy [repositoryUrl]: https://github.com/DigiLive/mushroom-strategy
[releaseUrl]: https://github.com/DigiLive/mushroom-strategy/releases/tag/v2.3.2 [releaseUrl]: https://github.com/DigiLive/mushroom-strategy/releases/tag/v2.3.2

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 <http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -13,7 +13,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 <http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -36,8 +36,8 @@ class VacuumView extends AbstractView {
return { return {
title: localize('vacuum.all_vacuums'), title: localize('vacuum.all_vacuums'),
subtitle: subtitle:
`${Registry.getCountTemplate(VacuumView.domain, 'in', '[cleaning, returning]')} ${localize('vacuum.vacuums')} ` + Registry.getCountTemplate(VacuumView.domain, 'in', '[cleaning, returning]') +
localize('generic.busy'), ` ${localize('vacuum.vacuums')} ${localize('generic.busy')}`,
}; };
} }