-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8203942
Showing
15 changed files
with
859 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2.1 | ||
orbs: | ||
elixir: membraneframework/elixir@1 | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- elixir/build_test: | ||
filters: &filters | ||
tags: | ||
only: /v.*/ | ||
- elixir/test: | ||
filters: | ||
<<: *filters | ||
- elixir/lint: | ||
filters: | ||
<<: *filters | ||
- elixir/hex_publish: | ||
requires: | ||
- elixir/build_test | ||
- elixir/test | ||
- elixir/lint | ||
context: | ||
- Deployment | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /v.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# This file contains the configuration for Credo and you are probably reading | ||
# this after creating it with `mix credo.gen.config`. | ||
# | ||
# If you find anything wrong or unclear in this file, please report an | ||
# issue on GitHub: https://github.com/rrrene/credo/issues | ||
# | ||
%{ | ||
# | ||
# You can have as many configs as you like in the `configs:` field. | ||
configs: [ | ||
%{ | ||
# | ||
# Run any config using `mix credo -C <name>`. If no config name is given | ||
# "default" is used. | ||
# | ||
name: "default", | ||
# | ||
# These are the files included in the analysis: | ||
files: %{ | ||
# | ||
# You can give explicit globs or simply directories. | ||
# In the latter case `**/*.{ex,exs}` will be used. | ||
# | ||
included: [ | ||
"lib/", | ||
"src/", | ||
"test/", | ||
"web/", | ||
"apps/*/lib/", | ||
"apps/*/src/", | ||
"apps/*/test/", | ||
"apps/*/web/" | ||
], | ||
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] | ||
}, | ||
# | ||
# Load and configure plugins here: | ||
# | ||
plugins: [], | ||
# | ||
# If you create your own checks, you must specify the source files for | ||
# them here, so they can be loaded by Credo before running the analysis. | ||
# | ||
requires: [], | ||
# | ||
# If you want to enforce a style guide and need a more traditional linting | ||
# experience, you can change `strict` to `true` below: | ||
# | ||
strict: false, | ||
# | ||
# To modify the timeout for parsing files, change this value: | ||
# | ||
parse_timeout: 5000, | ||
# | ||
# If you want to use uncolored output by default, you can change `color` | ||
# to `false` below: | ||
# | ||
color: true, | ||
# | ||
# You can customize the parameters of any check by adding a second element | ||
# to the tuple. | ||
# | ||
# To disable a check put `false` as second element: | ||
# | ||
# {Credo.Check.Design.DuplicatedCode, false} | ||
# | ||
checks: [ | ||
# | ||
## Consistency Checks | ||
# | ||
{Credo.Check.Consistency.ExceptionNames, []}, | ||
{Credo.Check.Consistency.LineEndings, []}, | ||
{Credo.Check.Consistency.ParameterPatternMatching, []}, | ||
{Credo.Check.Consistency.SpaceAroundOperators, []}, | ||
{Credo.Check.Consistency.SpaceInParentheses, []}, | ||
{Credo.Check.Consistency.TabsOrSpaces, []}, | ||
|
||
# | ||
## Design Checks | ||
# | ||
# You can customize the priority of any check | ||
# Priority values are: `low, normal, high, higher` | ||
# | ||
{Credo.Check.Design.AliasUsage, | ||
[priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]}, | ||
# You can also customize the exit_status of each check. | ||
# If you don't want TODO comments to cause `mix credo` to fail, just | ||
# set this value to 0 (zero). | ||
# | ||
{Credo.Check.Design.TagTODO, [exit_status: 0]}, | ||
{Credo.Check.Design.TagFIXME, []}, | ||
|
||
# | ||
## Readability Checks | ||
# | ||
{Credo.Check.Readability.AliasOrder, [priority: :normal]}, | ||
{Credo.Check.Readability.FunctionNames, []}, | ||
{Credo.Check.Readability.LargeNumbers, []}, | ||
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]}, | ||
{Credo.Check.Readability.ModuleAttributeNames, []}, | ||
{Credo.Check.Readability.ModuleDoc, []}, | ||
{Credo.Check.Readability.ModuleNames, []}, | ||
{Credo.Check.Readability.ParenthesesInCondition, []}, | ||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, parens: true}, | ||
{Credo.Check.Readability.PredicateFunctionNames, []}, | ||
{Credo.Check.Readability.PreferImplicitTry, []}, | ||
{Credo.Check.Readability.RedundantBlankLines, []}, | ||
{Credo.Check.Readability.Semicolons, []}, | ||
{Credo.Check.Readability.SpaceAfterCommas, []}, | ||
{Credo.Check.Readability.StringSigils, []}, | ||
{Credo.Check.Readability.TrailingBlankLine, []}, | ||
{Credo.Check.Readability.TrailingWhiteSpace, []}, | ||
{Credo.Check.Readability.UnnecessaryAliasExpansion, []}, | ||
{Credo.Check.Readability.VariableNames, []}, | ||
{Credo.Check.Readability.WithSingleClause, false}, | ||
|
||
# | ||
## Refactoring Opportunities | ||
# | ||
{Credo.Check.Refactor.CondStatements, []}, | ||
{Credo.Check.Refactor.CyclomaticComplexity, []}, | ||
{Credo.Check.Refactor.FunctionArity, []}, | ||
{Credo.Check.Refactor.LongQuoteBlocks, []}, | ||
{Credo.Check.Refactor.MapInto, false}, | ||
{Credo.Check.Refactor.MatchInCondition, []}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless, []}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse, []}, | ||
{Credo.Check.Refactor.Nesting, []}, | ||
{Credo.Check.Refactor.UnlessWithElse, []}, | ||
{Credo.Check.Refactor.WithClauses, []}, | ||
|
||
# | ||
## Warnings | ||
# | ||
{Credo.Check.Warning.BoolOperationOnSameValues, []}, | ||
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, | ||
{Credo.Check.Warning.IExPry, []}, | ||
{Credo.Check.Warning.IoInspect, []}, | ||
{Credo.Check.Warning.LazyLogging, false}, | ||
{Credo.Check.Warning.MixEnv, []}, | ||
{Credo.Check.Warning.OperationOnSameValues, []}, | ||
{Credo.Check.Warning.OperationWithConstantResult, []}, | ||
{Credo.Check.Warning.RaiseInsideRescue, []}, | ||
{Credo.Check.Warning.UnusedEnumOperation, []}, | ||
{Credo.Check.Warning.UnusedFileOperation, []}, | ||
{Credo.Check.Warning.UnusedKeywordOperation, []}, | ||
{Credo.Check.Warning.UnusedListOperation, []}, | ||
{Credo.Check.Warning.UnusedPathOperation, []}, | ||
{Credo.Check.Warning.UnusedRegexOperation, []}, | ||
{Credo.Check.Warning.UnusedStringOperation, []}, | ||
{Credo.Check.Warning.UnusedTupleOperation, []}, | ||
{Credo.Check.Warning.UnsafeExec, []}, | ||
|
||
# | ||
# Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`) | ||
|
||
# | ||
# Controversial and experimental checks (opt-in, just replace `false` with `[]`) | ||
# | ||
{Credo.Check.Readability.StrictModuleLayout, | ||
priority: :normal, order: ~w/shortdoc moduledoc behaviour use import require alias/a}, | ||
{Credo.Check.Consistency.MultiAliasImportRequireUse, false}, | ||
{Credo.Check.Consistency.UnusedVariableNames, force: :meaningful}, | ||
{Credo.Check.Design.DuplicatedCode, false}, | ||
{Credo.Check.Readability.AliasAs, false}, | ||
{Credo.Check.Readability.MultiAlias, false}, | ||
{Credo.Check.Readability.Specs, []}, | ||
{Credo.Check.Readability.SinglePipe, false}, | ||
{Credo.Check.Readability.WithCustomTaggedTuple, false}, | ||
{Credo.Check.Refactor.ABCSize, false}, | ||
{Credo.Check.Refactor.AppendSingleItem, false}, | ||
{Credo.Check.Refactor.DoubleBooleanNegation, false}, | ||
{Credo.Check.Refactor.ModuleDependencies, false}, | ||
{Credo.Check.Refactor.NegatedIsNil, false}, | ||
{Credo.Check.Refactor.PipeChainStart, false}, | ||
{Credo.Check.Refactor.VariableRebinding, false}, | ||
{Credo.Check.Warning.LeakyEnvironment, false}, | ||
{Credo.Check.Warning.MapGetUnsafePass, false}, | ||
{Credo.Check.Warning.UnsafeToAtom, false} | ||
|
||
# | ||
# Custom checks can be created using `mix credo.gen.check`. | ||
# | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
tab_width = 2 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
inputs: [ | ||
"{lib,test,config}/**/*.{ex,exs}", | ||
".formatter.exs", | ||
"*.exs" | ||
], | ||
import_deps: [:membrane_core] | ||
] |
12 changes: 12 additions & 0 deletions
12
...ub/ISSUE_TEMPLATE/please--open-new-issues-in-membranefranework-membrane_core.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Please, open new issues in membranefranework/membrane_core | ||
about: New issues related to this repo should be opened there | ||
title: "[DO NOT OPEN]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Please, do not open this issue here. Open it in the [membrane_core](https://github.com/membraneframework/membrane_core) repository instead. | ||
|
||
Thanks for helping us grow :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Fetch changes | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Trigger thrice a day | ||
schedule: | ||
- cron: '0 4,8,12 * * *' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: webfactory/ssh-agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Add remote | ||
run: | | ||
git remote add source [email protected]:membraneframework/membrane_template_plugin.git | ||
git remote update | ||
echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV | ||
- name: Check changes | ||
run: | | ||
echo ${{env.CURRENT_BRANCH}} | ||
echo "LOG_SIZE=$(git log origin/${{ env.CURRENT_BRANCH }}..source/${{ env.CURRENT_BRANCH }} | wc -l)" | ||
echo "LOG_SIZE=$(git log origin/${{ env.CURRENT_BRANCH }}..source/${{ env.CURRENT_BRANCH }} | wc -l)" >> $GITHUB_ENV | ||
|
||
- if: ${{ env.LOG_SIZE != '0'}} | ||
name: Merge changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "MembraneFramework" | ||
git merge source/master | ||
git push origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Close issue when opened' | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
jobs: | ||
close: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout membrane_core | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: membraneframework/membrane_core | ||
- name: Close issue | ||
uses: ./.github/actions/close_issue | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.MEMBRANEFRAMEWORKADMIN_TOKEN }} | ||
ISSUE_URL: ${{ github.event.issue.html_url }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY: ${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Add PR to Smackore project board, if the author is from outside Membrane Team | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
jobs: | ||
maybe_add_to_project_board: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout membrane_core | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: membraneframework/membrane_core | ||
- name: Puts PR in "New PRs by community" column in the Smackore project, if the author is from outside Membrane Team | ||
uses: ./.github/actions/add_pr_to_smackore_board | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.MEMBRANEFRAMEWORKADMIN_TOKEN }} | ||
AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }} | ||
PR_URL: ${{ github.event.pull_request.html_url }} |
Oops, something went wrong.