diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4f0dd7ee..9e5b74d8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,4 +20,5 @@ ## Issues Relacionadas [Adicione as issues relacionadas a esse PR, se houver.] -- [link da issue 1] \ No newline at end of file + +- [link da issue 1] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 552de94b..83726ec5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build KMP (Android + iOS) on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] workflow_dispatch: inputs: run_ios: @@ -29,7 +29,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 17 - name: Grant permission to gradlew diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml new file mode 100644 index 00000000..3d134405 --- /dev/null +++ b/.github/workflows/mega-linter.yml @@ -0,0 +1,42 @@ +# MegaLinter GitHub Action configuration file +# More info at https://megalinter.io +--- +name: MegaLinter + +on: + pull_request: + branches: + - master + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + megalinter: + name: MegaLinter + runs-on: ubuntu-latest + + # Give the default GITHUB_TOKEN write permission to commit and push, comment + # issues, and post new Pull Requests; remove the ones you do not need + permissions: + contents: write + pull-requests: write + + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + + fetch-depth: 0 + + # MegaLinter + - name: MegaLinter + uses: oxsecurity/megalinter/flavors/java@v8 + id: ml + + env: + VALIDATE_ALL_CODEBASE: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..bef4aa82 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,5 @@ +{ + "MD033": { + "allowed_elements": ["img", "a"] + } +} diff --git a/.mega-linter.yml b/.mega-linter.yml new file mode 100644 index 00000000..f9d276d8 --- /dev/null +++ b/.mega-linter.yml @@ -0,0 +1,34 @@ +# Configuration file for MegaLinter +# +# See all available variables at https://megalinter.io/latest/config-file/ and in +# linters documentation + +# all, none, or list of linter keys +APPLY_FIXES: none + +# If you use ENABLE variable, all other languages/formats/tooling-formats will +# be disabled by default +# ENABLE: + +# If you use ENABLE_LINTERS variable, all other linters will be disabled by +# default +ENABLE_LINTERS: + - YAML_PRETTIER + - MARKDOWN_MARKDOWNLINT + - KOTLIN_DETEKT + +DISABLE: + - COPYPASTE # Comment to enable checks of excessive copy-pastes + # - SPELL # Uncomment to disable checks of spelling mistakes + +SHOW_ELAPSED_TIME: true + +FILEIO_REPORTER: false + +# Uncomment if you want MegaLinter to detect errors but not block CI to pass +# DISABLE_ERRORS: true +MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json +MARKDOWN_MARKDOWNLINT_DISABLE_ERRORS: false +KOTLIN_DETEKT_ARGUMENTS: -c config/detekt/detekt.yml -ex "**/build/**" -p "lib/detekt-formatting-1.23.7.jar" + +DISABLE_ERRORS: true diff --git a/CONTRIBUTOR_PROJECT.md b/CONTRIBUTOR_PROJECT.md index 075fa8ef..f61c5c0a 100644 --- a/CONTRIBUTOR_PROJECT.md +++ b/CONTRIBUTOR_PROJECT.md @@ -1,22 +1,25 @@ **1. Abra a parte de ISSUES do GitHub e escolha uma issue que você se identifica ou gostaria de explorá-la.** + - 1.1. Caso você queira aprender algo ou quer explorar o processo de mentoria ou está na dúvida sobre o que pegar. - - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix (Rods, Gabriel Moro ou Carlos Vacarri), para ajudar a instruí-l(a/o). - - Essa parte da dinâmica da mentoria será moldada junto com você, então tente/tenha paciência e vamos aprender juntos! + - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix (Rods, Gabriel Moro ou Carlos Vacarri), para ajudar a instruí-l(a/o). + - Essa parte da dinâmica da mentoria será moldada junto com você, então tente/tenha paciência e vamos aprender juntos! - 1.2. Caso você queira ajudar a galera no processo de mentoria. - - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix, e participe ajudando o pessoal lá. - - Entre em contato conosco no Discord com Rods, Gabriel Moro ou Carlos Vacarri. + - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix, e participe ajudando o pessoal lá. + - Entre em contato conosco no Discord com Rods, Gabriel Moro ou Carlos Vacarri. - 1.3. Caso você esteja apenas procurando um pretexto para codar, fazer alguma melhoria ou porque não pegar algo divertido para fazer! - - Siga o resto dos passos e seja bem-vindo! + - Siga o resto dos passos e seja bem-vindo! - 1.4 Caso tenha sentido falta de algo que não está mapeando, crie uma issue, e fale com nossos membros apoiadores; - 1.5 Quer gravar video no CodandoTV do que você fez? - - Fale com Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) + - Fale com Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) **2. Associe seu nome, se não der, é porque você precisa participar do grupo `Codevs`, entre em contato com nossos membros apoiadores do discord para adicionarem você nesse grupo;** + - 2.2. Se você quer fazer algo que ainda não tem uma issue fale com Rods para instrui-lo **3. Faça um fork deste repositório na sua máquina;** **4. Crie uma branch a partir da `master` para a sua feature;** + ```git git checkout -b feature/issue ``` @@ -24,11 +27,13 @@ git checkout -b feature/issue **5. Desenvolva e teste sua feature;** **6. Faça commit das suas alterações:** + ```git git commit -m 'Adicionando minha feature' ``` **7. Faça push para o repositório remoto;** + ```git git push origin minha-feature ``` diff --git a/CONTRIBUTOR_WIKI.md b/CONTRIBUTOR_WIKI.md index 11486d24..7ab1efbf 100644 --- a/CONTRIBUTOR_WIKI.md +++ b/CONTRIBUTOR_WIKI.md @@ -1,22 +1,28 @@ **1. Faça um fork do repositório** **2. Clone o repositório** + ```git git clone https://github.com/CodandoTV/StreamPlayerApp.wiki.git ``` + **3. Acessa a pasta wiki** + ``` cd StreamPlayerApp.wiki ``` + **4. Faça as alterações desejadas nos arquivos da wiki;** **5. Commit e push das alterações para o seu repositório forked:** + ```git git checkout -b "nome do seu branch" git add . git commit -m "Descrição das alterações" git push ``` + **6. Crie um novo Pull Request, escolhendo o repositório original como base e a branch com as suas alterações.** **7. Preencha os detalhes do PR, fornecendo um título e uma descrição clara.** diff --git a/README.md b/README.md index b5a32599..cf26ea20 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # StreamPlayerApp -

+ +

[![Backers on Open Collective](https://opencollective.com/stremplayerapp/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/stremplayerapp/sponsors/badge.svg)](#sponsors) -

+ ![Logo do Projeto](file_readme/codandotv.png) @@ -20,42 +21,46 @@ StreamPlayerApp is an open source project based on the Netflix app, all of the f **Flow, Compose, Koin, NavigationCompose, Arquitetura MVVM com clean architecture entre outras ( ainda será separado um link para isso)** ## 🏋️‍♀️ Goal + This project was initiated with the purpose of providing a hands-on and collaborative learning opportunity for the community. Through it, participants can improve their skills in Android development, Kotlin, clean architecture and teamwork. ## 💬 Communication + We have a specific channel called [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)) in our [Discord](https://discord.gg/fZMDmjKmju) server to talk about the project. ------------------------------------------- +--- + +### 🚨 If you arrived here, and you are not subscribed in our YouTube channel, this is a great moment to do that 🙏 -### 🚨 If you arrived here, and you are not subscribed in our YouTube channel, this is a great moment to do that 🙏. [![CodandoTV](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://bit.ly/3Ob3yPH) Follow our playlist of videos called [Projeto Netflix](https://www.youtube.com/playlist?list=PL-7tME9TKyA4At5ze9i8-w_trk7nXMGRj), all of the material was produced using this repository. ------------------------------------------- +--- ## ✨ How to contribute? If you wish to contribute to this project, chose the best path that suits you: 1. If you want to learn something or want to explore the mentoring process or you have questions about what you should do. - - Talk to someone in our [Discord](https://discord.gg/fZMDmjKmju), you can use the channel called [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)(Rods, Gabriel Moro or Carlos Vaccari) to help you. - - The mentoring will be shaped together with we do not know how it will be, so be patient and let's learn together 😊! - - The main goal is to use the Discord as main communication tool. - + - Talk to someone in our [Discord](https://discord.gg/fZMDmjKmju), you can use the channel called [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)(Rods, Gabriel Moro or Carlos Vaccari) to help you. + - The mentoring will be shaped together with we do not know how it will be, so be patient and let's learn together 😊! + - The main goal is to use the Discord as main communication tool. 2. If you want to help mentoring people: - - Talk to someone in the Discord, use the channel `#projeto-netflix`, you can start from there helping people there. - - Reach us in the [Discord](https://discord.gg/fZMDmjKmju) server, you can reach out Rods, Moro or Carlos Vaccari. + + - Talk to someone in the Discord, use the channel `#projeto-netflix`, you can start from there helping people there. + - Reach us in the [Discord](https://discord.gg/fZMDmjKmju) server, you can reach out Rods, Moro or Carlos Vaccari. 3. If you are just trying to find an excuse to code, do some fun or why do not you find something fun to do! - - Follow the [steps](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) and welcome! + + - Follow the [steps](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) and welcome! 4. If there is a lack of something that is not being mapped, there is an issue and a failure with our supporting members; 5. If you want to record videos to be published in the CodandoTV channel showing what you did, you can: - - Talk to Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) + - Talk to Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) -All contributions conditions are available here in the [Step-by-step to be a contributor](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) +All contributions conditions are available here in the [Step-by-step to be a contributor](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) --- @@ -66,7 +71,7 @@ I hope our wiki becomes richer and richer, so it will be a continuous process. T If you realize that something relevant is missing here, please vote and post a PR for the wiki as well! [Step-by-step](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_WIKI.md) ---- +--- ## 🎤 How to use the Discussions option (4th tab in our git project) @@ -84,15 +89,12 @@ We have a section called `discussions`, this is hosted in our repository, so we ### If you arrived here, please subscribe in our YouTube channel 😛 [Codandotv](https://bit.ly/3Ob3yPH) - ## Contributors This project exists thanks to all the people who contribute. - -License -------- +## License Copyright 2023 Rodrigo Vianna @@ -107,5 +109,3 @@ License WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - diff --git a/README_pt-br.md b/README_pt-br.md index 9a8d35a7..77c369af 100644 --- a/README_pt-br.md +++ b/README_pt-br.md @@ -1,11 +1,12 @@ # StreamPlayerApp -

+ +

[![Backers on Open Collective](https://opencollective.com/stremplayerapp/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/stremplayerapp/sponsors/badge.svg)](#sponsors) -

+ ![Logo do Projeto](file_readme/codandotv.png) @@ -14,45 +15,50 @@ 🇺🇸 If you speak English, take a look [here](./README.md) 🇺🇸 ## 🎯 Sobre o Projeto + O projeto StreamPlayerApp é um clone do Netflix, desenvolvido de forma colaborativa e gratuita para a comunidade. O objetivo é proporcionar uma experiência de aprendizado e prática de programação, além de servir como uma plataforma de mentoria. Por causa disso estaremos utilizando todas as tecnologias mais atuais de desenvolvimento android como: **Flow, Compose, Koin, NavigationCompose, Arquitetura MVVM com clean architecture entre outras ( ainda será separado um link para isso)** ## 🏋️‍♀️ Motivação + Este projeto foi iniciado com o propósito de fornecer uma oportunidade de aprendizado prático e colaborativo para a comunidade. Através dele, os participantes podem aprimorar suas habilidades em desenvolvimento Android, Kotlin, arquitetura de aplicativos e trabalho em equipe. -## 💬 Comunicação: +## 💬 Comunicação + Toda a comunicação desse grupo será feita no nosso grupo do [Discord](https://discord.gg/fZMDmjKmju) no canal [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)) ------------------------------------------- +--- + +### 🚨 Ahhhhhh se você esta entrando nesse repo, ou sendo mento(ra/r) ou sendo mentorad(a/o) ou passando aqui por a caso só para pegar um café ☕ e ainda não se inscreveu no canal, inscreva-se 🙏 -### 🚨 Ahhhhhh se você esta entrando nesse repo, ou sendo mento(ra/r) ou sendo mentorad(a/o) ou passando aqui por a caso só para pegar um café ☕ e ainda não se inscreveu no canal, inscreva-se 🙏. [![CodandoTV](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://bit.ly/3Ob3yPH) Acompanhe a série [Projeto Netflix](https://www.youtube.com/playlist?list=PL-7tME9TKyA4At5ze9i8-w_trk7nXMGRj) que é um conteúdo originado deste repositório ------------------------------------------- +--- ## ✨ Como Contribuir Se você deseja contribuir para o projeto veja, qual cenário que se adeque melhor a você: 1. Caso você queira aprender algo ou quer explorar o processo de mentoria ou está na dúvida sobre o que pegar. - - Fale com um dos membros apoiadores no grupo do [Discord](https://discord.gg/fZMDmjKmju), no canal [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)(Rods, Gabriel Moro ou Carlos Vaccari), para ajudar a instruí-l(a/o). - - Essa parte da dinâmica da mentoria será moldada junto com você, logo não sabemos como vai ser na pratica 😊, então tente/tenha paciência e vamos aprender juntos! - - O objetivo é utilizar o discord como principal meio de comunicação - + - Fale com um dos membros apoiadores no grupo do [Discord](https://discord.gg/fZMDmjKmju), no canal [#projeto-netflix](https://discord.com/channels/843114243859546142/1101921493010616351)(Rods, Gabriel Moro ou Carlos Vaccari), para ajudar a instruí-l(a/o). + - Essa parte da dinâmica da mentoria será moldada junto com você, logo não sabemos como vai ser na pratica 😊, então tente/tenha paciência e vamos aprender juntos! + - O objetivo é utilizar o discord como principal meio de comunicação 2. Caso você queira ajudar a galera no processo de mentoria. - - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix, e participe ajudando o pessoal lá. - - Entre em contato conosco no [Discord](https://discord.gg/fZMDmjKmju) com Rods, Gabriel Moro ou Carlos Vaccari. + + - Fale com um dos membros apoiadores no grupo do Discord, no canal #projeto-netflix, e participe ajudando o pessoal lá. + - Entre em contato conosco no [Discord](https://discord.gg/fZMDmjKmju) com Rods, Gabriel Moro ou Carlos Vaccari. 3. Caso você esteja apenas procurando um pretexto para codar, fazer alguma melhoria ou porque não pegar algo divertido para fazer! - - Siga o resto dos [passos](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) e seja bem-vindo! + + - Siga o resto dos [passos](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) e seja bem-vindo! 4. Caso tenha sentido falta de algo que não está mapeando, crie uma issue e fale com nossos membros apoiadores; 5. Quer gravar vídeo no CodandoTV do que você fez? - - Fale com Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) + - Fale com Rods! [Discord](https://discord.gg/fZMDmjKmju) / [LinkedIn](https://www.linkedin.com/in/rviannaoliveira/) Para todas as condições de contribuições do repo, a continuação está no [Passo a Passo Completo](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_PROJECT.md) @@ -66,7 +72,7 @@ Lá estarão listadas, nossas tecnologias, e motivadores e mais alguma coisa que Se vc achou que faltou algo relevante ali, fique a vontade e faça um PR para wiki também! [Passo a Passo](https://github.com/CodandoTV/StreamPlayerApp/blob/master/CONTRIBUTOR_WIKI.md) ---- +--- ## 🎤 Como usar a opção Discussions (quarta aba do projeto do git) @@ -84,15 +90,12 @@ Criei um `discussions` e la além de ficar no histórico, se quiser olhar o exem ### Se você chegou ate aqui na leitura, se inscreva no canal 😛 [Codandotv](https://bit.ly/3Ob3yPH) - ## Contribuidores Este projeto existe graças a todas as pessoas que contribuem. - -License -------- +## License Copyright 2023 Rodrigo Vianna @@ -107,5 +110,3 @@ License WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index bdda0271..22d16e30 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -12,12 +12,12 @@ config: warningsAsErrors: false checkExhaustiveness: false # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' - excludes: '' + excludes: "" processors: active: true exclude: - - 'DetektProgressListener' + - "DetektProgressListener" # - 'KtFileCountProcessor' # - 'PackageCountProcessor' # - 'ClassCountProcessor' @@ -34,11 +34,11 @@ processors: console-reports: active: true exclude: - - 'ProjectStatisticsReport' - - 'ComplexityReport' - - 'NotificationReport' - - 'FindingsReport' - - 'FileBasedFindingsReport' + - "ProjectStatisticsReport" + - "ComplexityReport" + - "NotificationReport" + - "FindingsReport" + - "FileBasedFindingsReport" # - 'LiteFindingsReport' output-reports: @@ -54,7 +54,7 @@ comments: active: true AbsentOrWrongFileLicense: active: false - licenseTemplateFile: 'license.template' + licenseTemplateFile: "license.template" licenseTemplateIsRegex: false CommentOverPrivateFunction: active: false @@ -67,7 +67,17 @@ comments: endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' KDocReferencesNonPublicProperty: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] OutdatedDocumentation: active: false matchTypeParameters: true @@ -75,7 +85,17 @@ comments: allowParamOnConstructorProperties: false UndocumentedPublicClass: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true @@ -83,11 +103,31 @@ comments: searchInProtectedClass: false UndocumentedPublicFunction: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] searchProtectedFunction: false UndocumentedPublicProperty: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] searchProtectedProperty: false complexity: @@ -111,15 +151,15 @@ complexity: ignoreSimpleWhenEntries: false ignoreNestingFunctions: false nestingFunctions: - - 'also' - - 'apply' - - 'forEach' - - 'isNotNull' - - 'ifNull' - - 'let' - - 'run' - - 'use' - - 'with' + - "also" + - "apply" + - "forEach" + - "isNotNull" + - "ifNull" + - "let" + - "run" + - "use" + - "with" LabeledExpression: active: false ignoredLabels: [] @@ -150,23 +190,43 @@ complexity: active: false threshold: 1 functions: - - 'kotlin.apply' - - 'kotlin.run' - - 'kotlin.with' - - 'kotlin.let' - - 'kotlin.also' + - "kotlin.apply" + - "kotlin.run" + - "kotlin.with" + - "kotlin.let" + - "kotlin.also" ReplaceSafeCallChainWithRun: active: false StringLiteralDuplication: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] threshold: 3 ignoreAnnotation: true excludeStringsWithLessThan5Characters: true - ignoreStringsRegex: '$^' + ignoreStringsRegex: "$^" TooManyFunctions: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] thresholdInFiles: 11 thresholdInClasses: 11 thresholdInInterfaces: 11 @@ -184,9 +244,9 @@ coroutines: InjectDispatcher: active: true dispatcherNames: - - 'IO' - - 'Default' - - 'Unconfined' + - "IO" + - "Default" + - "Unconfined" RedundantSuspendModifier: active: true SleepInsteadOfDelay: @@ -202,7 +262,7 @@ empty-blocks: active: true EmptyCatchBlock: active: true - allowedExceptionNameRegex: '_|(ignore|expected).*' + allowedExceptionNameRegex: "_|(ignore|expected).*" EmptyClassBlock: active: true EmptyDefaultConstructor: @@ -238,13 +298,23 @@ exceptions: ExceptionRaisedInUnexpectedLocation: active: true methodNames: - - 'equals' - - 'finalize' - - 'hashCode' - - 'toString' + - "equals" + - "finalize" + - "hashCode" + - "toString" InstanceOfCheckForException: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] NotImplementedDeclaration: active: false ObjectExtendsThrowable: @@ -259,67 +329,87 @@ exceptions: SwallowedException: active: true ignoredExceptionTypes: - - 'InterruptedException' - - 'MalformedURLException' - - 'NumberFormatException' - - 'ParseException' - allowedExceptionNameRegex: '_|(ignore|expected).*' + - "InterruptedException" + - "MalformedURLException" + - "NumberFormatException" + - "ParseException" + allowedExceptionNameRegex: "_|(ignore|expected).*" ThrowingExceptionFromFinally: active: true ThrowingExceptionInMain: active: false ThrowingExceptionsWithoutMessageOrCause: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] exceptions: - - 'ArrayIndexOutOfBoundsException' - - 'Exception' - - 'IllegalArgumentException' - - 'IllegalMonitorStateException' - - 'IllegalStateException' - - 'IndexOutOfBoundsException' - - 'NullPointerException' - - 'RuntimeException' - - 'Throwable' + - "ArrayIndexOutOfBoundsException" + - "Exception" + - "IllegalArgumentException" + - "IllegalMonitorStateException" + - "IllegalStateException" + - "IndexOutOfBoundsException" + - "NullPointerException" + - "RuntimeException" + - "Throwable" ThrowingNewInstanceOfSameException: active: true TooGenericExceptionCaught: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] exceptionNames: - - 'ArrayIndexOutOfBoundsException' - - 'Error' - - 'Exception' - - 'IllegalMonitorStateException' - - 'IndexOutOfBoundsException' - - 'NullPointerException' - - 'RuntimeException' - - 'Throwable' - allowedExceptionNameRegex: '_|(ignore|expected).*' + - "ArrayIndexOutOfBoundsException" + - "Error" + - "Exception" + - "IllegalMonitorStateException" + - "IndexOutOfBoundsException" + - "NullPointerException" + - "RuntimeException" + - "Throwable" + allowedExceptionNameRegex: "_|(ignore|expected).*" TooGenericExceptionThrown: active: true exceptionNames: - - 'Error' - - 'Exception' - - 'RuntimeException' - - 'Throwable' + - "Error" + - "Exception" + - "RuntimeException" + - "Throwable" naming: active: true BooleanPropertyNaming: active: false - allowedPattern: '^(is|has|are)' + allowedPattern: "^(is|has|are)" ClassNaming: active: true - classPattern: '[A-Z][a-zA-Z0-9]*' + classPattern: "[A-Z][a-zA-Z0-9]*" ConstructorParameterNaming: active: true - parameterPattern: '[a-z][A-Za-z0-9]*' - privateParameterPattern: '[a-z][A-Za-z0-9]*' - excludeClassPattern: '$^' + parameterPattern: "[a-z][A-Za-z0-9]*" + privateParameterPattern: "[a-z][A-Za-z0-9]*" + excludeClassPattern: "$^" EnumNaming: active: true - enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' + enumEntryPattern: "[A-Z][_a-zA-Z0-9]*" ForbiddenClassName: active: false forbiddenName: [] @@ -331,21 +421,31 @@ naming: minimumFunctionNameLength: 3 FunctionNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] - functionPattern: '[a-z][a-zA-Z0-9]*' - excludeClassPattern: '$^' - ignoreAnnotated: ['Composable'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] + functionPattern: "[a-z][a-zA-Z0-9]*" + excludeClassPattern: "$^" + ignoreAnnotated: ["Composable"] FunctionParameterNaming: active: true - parameterPattern: '[a-z][A-Za-z0-9]*' - excludeClassPattern: '$^' + parameterPattern: "[a-z][A-Za-z0-9]*" + excludeClassPattern: "$^" InvalidPackageDeclaration: active: true - rootPackage: '' + rootPackage: "" requireRootInDeclaration: false LambdaParameterNaming: active: false - parameterPattern: '[a-z][A-Za-z0-9]*|_' + parameterPattern: "[a-z][A-Za-z0-9]*|_" MatchingDeclarationName: active: true mustBeFirst: true @@ -358,17 +458,17 @@ naming: active: false ObjectPropertyNaming: active: true - constantPattern: '[A-Za-z][_A-Za-z0-9]*' - propertyPattern: '[A-Za-z][_A-Za-z0-9]*' - privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' + constantPattern: "[A-Za-z][_A-Za-z0-9]*" + propertyPattern: "[A-Za-z][_A-Za-z0-9]*" + privatePropertyPattern: "(_)?[A-Za-z][_A-Za-z0-9]*" PackageNaming: active: false packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - constantPattern: '[A-Z][_A-Z0-9]*' - propertyPattern: '[A-Za-z][_A-Za-z0-9]*' - privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' + constantPattern: "[A-Z][_A-Z0-9]*" + propertyPattern: "[A-Za-z][_A-Za-z0-9]*" + privatePropertyPattern: "_?[A-Za-z][_A-Za-z0-9]*" VariableMaxLength: active: false maximumVariableNameLength: 64 @@ -377,9 +477,9 @@ naming: minimumVariableNameLength: 1 VariableNaming: active: true - variablePattern: '[a-z][A-Za-z0-9]*' - privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' - excludeClassPattern: '$^' + variablePattern: "[a-z][A-Za-z0-9]*" + privateVariablePattern: "(_)?[a-z][A-Za-z0-9]*" + excludeClassPattern: "$^" performance: active: true @@ -390,10 +490,30 @@ performance: threshold: 3 ForEachOnRange: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] SpreadOperator: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] UnnecessaryPartOfBinaryExpression: active: false UnnecessaryTemporaryInstantiation: @@ -404,7 +524,7 @@ potential-bugs: AvoidReferentialEquality: active: true forbiddenTypePatterns: - - 'kotlin.String' + - "kotlin.String" CastNullableToNonNullableType: active: false CastToNullableType: @@ -416,14 +536,14 @@ potential-bugs: DoubleMutabilityForCollection: active: true mutableTypes: - - 'kotlin.collections.MutableList' - - 'kotlin.collections.MutableMap' - - 'kotlin.collections.MutableSet' - - 'java.util.ArrayList' - - 'java.util.LinkedHashSet' - - 'java.util.HashSet' - - 'java.util.LinkedHashMap' - - 'java.util.HashMap' + - "kotlin.collections.MutableList" + - "kotlin.collections.MutableMap" + - "kotlin.collections.MutableSet" + - "java.util.ArrayList" + - "java.util.LinkedHashSet" + - "java.util.HashSet" + - "java.util.LinkedHashMap" + - "java.util.HashMap" ElseCaseInsteadOfExhaustiveWhen: active: false ignoredSubjectTypes: [] @@ -441,17 +561,17 @@ potential-bugs: active: true restrictToConfig: true returnValueAnnotations: - - 'CheckResult' - - '*.CheckResult' - - 'CheckReturnValue' - - '*.CheckReturnValue' + - "CheckResult" + - "*.CheckResult" + - "CheckReturnValue" + - "*.CheckReturnValue" ignoreReturnValueAnnotations: - - 'CanIgnoreReturnValue' - - '*.CanIgnoreReturnValue' + - "CanIgnoreReturnValue" + - "*.CanIgnoreReturnValue" returnValueTypes: - - 'kotlin.sequences.Sequence' - - 'kotlinx.coroutines.flow.*Flow' - - 'java.util.stream.*Stream' + - "kotlin.sequences.Sequence" + - "kotlinx.coroutines.flow.*Flow" + - "java.util.stream.*Stream" ignoreFunctionCall: [] ImplicitDefaultLocale: active: true @@ -466,13 +586,23 @@ potential-bugs: active: true LateinitUsage: active: false - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] - ignoreOnClassesPattern: '' + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] + ignoreOnClassesPattern: "" MapGetWithNotNullAssertionOperator: active: true MissingPackageDeclaration: active: false - excludes: ['**/*.kts'] + excludes: ["**/*.kts"] NullCheckOnMutableProperty: active: false NullableToStringCall: @@ -493,7 +623,17 @@ potential-bugs: active: true UnsafeCallOnNullableType: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + ] UnsafeCast: active: true UnusedUnaryOperator: @@ -509,12 +649,12 @@ style: active: false BracesOnIfStatements: active: false - singleLine: 'never' - multiLine: 'always' + singleLine: "never" + multiLine: "always" BracesOnWhenStatements: active: false - singleLine: 'necessary' - multiLine: 'consistent' + singleLine: "necessary" + multiLine: "consistent" CanBeNonNullable: active: false CascadingCallWrapping: @@ -527,7 +667,7 @@ style: DataClassContainsFunctions: active: false conversionFunctionPrefix: - - 'to' + - "to" allowOperators: false DataClassShouldBeImmutable: active: false @@ -537,13 +677,13 @@ style: DoubleNegativeLambda: active: false negativeFunctions: - - reason: 'Use `takeIf` instead.' - value: 'takeUnless' - - reason: 'Use `all` instead.' - value: 'none' + - reason: "Use `takeIf` instead." + value: "takeUnless" + - reason: "Use `all` instead." + value: "none" negativeFunctionNameParts: - - 'not' - - 'non' + - "not" + - "non" EqualsNullCall: active: true EqualsOnSignatureLine: @@ -558,41 +698,41 @@ style: ForbiddenAnnotation: active: false annotations: - - reason: 'it is a java annotation. Use `Suppress` instead.' - value: 'java.lang.SuppressWarnings' - - reason: 'it is a java annotation. Use `kotlin.Deprecated` instead.' - value: 'java.lang.Deprecated' - - reason: 'it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead.' - value: 'java.lang.annotation.Documented' - - reason: 'it is a java annotation. Use `kotlin.annotation.Target` instead.' - value: 'java.lang.annotation.Target' - - reason: 'it is a java annotation. Use `kotlin.annotation.Retention` instead.' - value: 'java.lang.annotation.Retention' - - reason: 'it is a java annotation. Use `kotlin.annotation.Repeatable` instead.' - value: 'java.lang.annotation.Repeatable' - - reason: 'Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265' - value: 'java.lang.annotation.Inherited' + - reason: "it is a java annotation. Use `Suppress` instead." + value: "java.lang.SuppressWarnings" + - reason: "it is a java annotation. Use `kotlin.Deprecated` instead." + value: "java.lang.Deprecated" + - reason: "it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead." + value: "java.lang.annotation.Documented" + - reason: "it is a java annotation. Use `kotlin.annotation.Target` instead." + value: "java.lang.annotation.Target" + - reason: "it is a java annotation. Use `kotlin.annotation.Retention` instead." + value: "java.lang.annotation.Retention" + - reason: "it is a java annotation. Use `kotlin.annotation.Repeatable` instead." + value: "java.lang.annotation.Repeatable" + - reason: "Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265" + value: "java.lang.annotation.Inherited" ForbiddenComment: active: true comments: - - reason: 'Forbidden FIXME todo marker in comment, please fix the problem.' - value: 'FIXME:' - - reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.' - value: 'STOPSHIP:' - - reason: 'Forbidden TODO todo marker in comment, please do the changes.' - value: 'TODO:' - allowedPatterns: '' + - reason: "Forbidden FIXME todo marker in comment, please fix the problem." + value: "FIXME:" + - reason: "Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code." + value: "STOPSHIP:" + - reason: "Forbidden TODO todo marker in comment, please do the changes." + value: "TODO:" + allowedPatterns: "" ForbiddenImport: active: false imports: [] - forbiddenPatterns: '' + forbiddenPatterns: "" ForbiddenMethodCall: active: false methods: - - reason: 'print does not allow you to configure the output stream. Use a logger instead.' - value: 'kotlin.io.print' - - reason: 'println does not allow you to configure the output stream. Use a logger instead.' - value: 'kotlin.io.println' + - reason: "print does not allow you to configure the output stream. Use a logger instead." + value: "kotlin.io.print" + - reason: "println does not allow you to configure the output stream. Use a logger instead." + value: "kotlin.io.println" ForbiddenSuppress: active: false rules: [] @@ -610,12 +750,23 @@ style: maxJumpCount: 1 MagicNumber: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts'] + excludes: + [ + "**/test/**", + "**/androidTest/**", + "**/commonTest/**", + "**/jvmTest/**", + "**/androidUnitTest/**", + "**/androidInstrumentedTest/**", + "**/jsTest/**", + "**/iosTest/**", + "**/*.kts", + ] ignoreNumbers: - - '-1' - - '0' - - '1' - - '2' + - "-1" + - "0" + - "1" + - "2" ignoreHashCodeFunction: true ignorePropertyDeclaration: false ignoreLocalVariableDeclaration: false @@ -648,8 +799,8 @@ style: active: false indentSize: 4 trimmingMethods: - - 'trimIndent' - - 'trimMargin' + - "trimIndent" + - "trimMargin" NestedClassesVisibility: active: true NewLineAtEndOfFile: @@ -678,7 +829,7 @@ style: active: true max: 2 excludedFunctions: - - 'equals' + - "equals" excludeLabeled: false excludeReturnFromLambda: true excludeGuardClauses: false @@ -701,8 +852,8 @@ style: TrimMultilineRawString: active: false trimmingMethods: - - 'trimIndent' - - 'trimMargin' + - "trimIndent" + - "trimMargin" UnderscoresInNumericLiterals: active: false acceptableLength: 4 @@ -734,15 +885,15 @@ style: active: false UnusedParameter: active: true - allowedNames: 'ignored|expected' + allowedNames: "ignored|expected" UnusedPrivateClass: active: true UnusedPrivateMember: active: true - allowedNames: '' + allowedNames: "" UnusedPrivateProperty: active: true - allowedNames: '_|ignored|expected|serialVersionUID' + allowedNames: "_|ignored|expected|serialVersionUID" UseAnyOrNoneInsteadOfFind: active: true UseArrayLiteralsInAnnotations: @@ -783,4 +934,4 @@ style: WildcardImport: active: true excludeImports: - - 'java.util.*' \ No newline at end of file + - "java.util.*" diff --git a/lib/detekt-formatting-1.23.7.jar b/lib/detekt-formatting-1.23.7.jar new file mode 100644 index 00000000..3e707543 Binary files /dev/null and b/lib/detekt-formatting-1.23.7.jar differ