Skip to content

Commit 11ae2b8

Browse files
authored
Merge pull request #1 from codeforgood-org/claude/reorganize-enhance-repo-011CV6Hi4sraSW9uHSwDo56V
Enhance repo and code organization
2 parents f9086e7 + 80834ac commit 11ae2b8

Some content is hidden

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

43 files changed

+3561
-121
lines changed

.credo.exs

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# This file contains the configuration for Credo and you are probably reading
2+
# this after creating it with `mix credo.gen.config`.
3+
#
4+
# If you find anything wrong or unclear in this file, please report an
5+
# issue on GitHub: https://github.com/rrrene/credo/issues
6+
#
7+
%{
8+
#
9+
# You can have as many configs as you like in the `configs:` field.
10+
configs: [
11+
%{
12+
#
13+
# Run any config using `mix credo -C <name>`. If no config name is given
14+
# "default" is used.
15+
#
16+
name: "default",
17+
#
18+
# These are the files included in the analysis:
19+
files: %{
20+
#
21+
# You can give explicit globs or simply directories.
22+
# In the latter case `**/*.{ex,exs}` will be used.
23+
#
24+
included: [
25+
"lib/",
26+
"test/"
27+
],
28+
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
29+
},
30+
#
31+
# Load and configure plugins here:
32+
#
33+
plugins: [],
34+
#
35+
# If you create your own checks, you must specify the source files for
36+
# them here, so they can be loaded by Credo before running the analysis.
37+
#
38+
requires: [],
39+
#
40+
# If you want to enforce a style guide and need a more traditional linting
41+
# experience, you can change `strict` to `true` below:
42+
#
43+
strict: false,
44+
#
45+
# To modify the timeout for parsing files, change this value:
46+
#
47+
parse_timeout: 5000,
48+
#
49+
# If you want to use uncolored output by default, you can change `color`
50+
# to `false` below:
51+
#
52+
color: true,
53+
#
54+
# You can customize the parameters of any check by adding a second element
55+
# to the tuple.
56+
#
57+
# To disable a check put `false` as second element:
58+
#
59+
# {Credo.Check.Design.DuplicatedCode, false}
60+
#
61+
checks: %{
62+
enabled: [
63+
#
64+
## Consistency Checks
65+
#
66+
{Credo.Check.Consistency.ExceptionNames, []},
67+
{Credo.Check.Consistency.LineEndings, []},
68+
{Credo.Check.Consistency.ParameterPatternMatching, []},
69+
{Credo.Check.Consistency.SpaceAroundOperators, []},
70+
{Credo.Check.Consistency.SpaceInParentheses, []},
71+
{Credo.Check.Consistency.TabsOrSpaces, []},
72+
73+
#
74+
## Design Checks
75+
#
76+
{Credo.Check.Design.AliasUsage,
77+
[priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]},
78+
{Credo.Check.Design.TagFIXME, []},
79+
{Credo.Check.Design.TagTODO, [exit_status: 0]},
80+
81+
#
82+
## Readability Checks
83+
#
84+
{Credo.Check.Readability.AliasOrder, []},
85+
{Credo.Check.Readability.FunctionNames, []},
86+
{Credo.Check.Readability.LargeNumbers, []},
87+
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
88+
{Credo.Check.Readability.ModuleAttributeNames, []},
89+
{Credo.Check.Readability.ModuleDoc, []},
90+
{Credo.Check.Readability.ModuleNames, []},
91+
{Credo.Check.Readability.ParenthesesInCondition, []},
92+
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
93+
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []},
94+
{Credo.Check.Readability.PredicateFunctionNames, []},
95+
{Credo.Check.Readability.PreferImplicitTry, []},
96+
{Credo.Check.Readability.RedundantBlankLines, []},
97+
{Credo.Check.Readability.Semicolons, []},
98+
{Credo.Check.Readability.SpaceAfterCommas, []},
99+
{Credo.Check.Readability.StringSigils, []},
100+
{Credo.Check.Readability.TrailingBlankLine, []},
101+
{Credo.Check.Readability.TrailingWhiteSpace, []},
102+
{Credo.Check.Readability.UnnecessaryAliasExpansion, []},
103+
{Credo.Check.Readability.VariableNames, []},
104+
{Credo.Check.Readability.WithSingleClause, []},
105+
106+
#
107+
## Refactoring Opportunities
108+
#
109+
{Credo.Check.Refactor.Apply, []},
110+
{Credo.Check.Refactor.CondStatements, []},
111+
{Credo.Check.Refactor.CyclomaticComplexity, []},
112+
{Credo.Check.Refactor.FunctionArity, []},
113+
{Credo.Check.Refactor.LongQuoteBlocks, []},
114+
{Credo.Check.Refactor.MatchInCondition, []},
115+
{Credo.Check.Refactor.MapJoin, []},
116+
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
117+
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
118+
{Credo.Check.Refactor.Nesting, []},
119+
{Credo.Check.Refactor.RedundantWithClauseResult, []},
120+
{Credo.Check.Refactor.UnlessWithElse, []},
121+
{Credo.Check.Refactor.WithClauses, []},
122+
123+
#
124+
## Warnings
125+
#
126+
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []},
127+
{Credo.Check.Warning.BoolOperationOnSameValues, []},
128+
{Credo.Check.Warning.Dbg, []},
129+
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
130+
{Credo.Check.Warning.IExPry, []},
131+
{Credo.Check.Warning.IoInspect, []},
132+
{Credo.Check.Warning.OperationOnSameValues, []},
133+
{Credo.Check.Warning.OperationWithConstantResult, []},
134+
{Credo.Check.Warning.RaiseInsideRescue, []},
135+
{Credo.Check.Warning.SpecWithStruct, []},
136+
{Credo.Check.Warning.UnsafeExec, []},
137+
{Credo.Check.Warning.UnusedEnumOperation, []},
138+
{Credo.Check.Warning.UnusedFileOperation, []},
139+
{Credo.Check.Warning.UnusedKeywordOperation, []},
140+
{Credo.Check.Warning.UnusedListOperation, []},
141+
{Credo.Check.Warning.UnusedPathOperation, []},
142+
{Credo.Check.Warning.UnusedRegexOperation, []},
143+
{Credo.Check.Warning.UnusedStringOperation, []},
144+
{Credo.Check.Warning.UnusedTupleOperation, []},
145+
{Credo.Check.Warning.WrongTestFileExtension, []}
146+
],
147+
disabled: [
148+
#
149+
# Checks scheduled for next check update (opt-in for now)
150+
{Credo.Check.Refactor.UtcNowTruncate, []},
151+
152+
#
153+
# Controversial and experimental checks (opt-in, just move the check to `:enabled`
154+
# and be sure to use `mix credo --strict` to see low priority checks)
155+
#
156+
{Credo.Check.Consistency.MultiAliasImportRequireUse, []},
157+
{Credo.Check.Consistency.UnusedVariableNames, []},
158+
{Credo.Check.Design.DuplicatedCode, []},
159+
{Credo.Check.Design.SkipTestWithoutComment, []},
160+
{Credo.Check.Readability.AliasAs, []},
161+
{Credo.Check.Readability.BlockPipe, []},
162+
{Credo.Check.Readability.ImplTrue, []},
163+
{Credo.Check.Readability.MultiAlias, []},
164+
{Credo.Check.Readability.NestedFunctionCalls, []},
165+
{Credo.Check.Readability.SeparateAliasRequire, []},
166+
{Credo.Check.Readability.SingleFunctionToBlockPipe, []},
167+
{Credo.Check.Readability.SinglePipe, []},
168+
{Credo.Check.Readability.Specs, []},
169+
{Credo.Check.Readability.StrictModuleLayout, []},
170+
{Credo.Check.Readability.WithCustomTaggedTuple, []},
171+
{Credo.Check.Refactor.ABCSize, []},
172+
{Credo.Check.Refactor.AppendSingleItem, []},
173+
{Credo.Check.Refactor.DoubleBooleanNegation, []},
174+
{Credo.Check.Refactor.FilterReject, []},
175+
{Credo.Check.Refactor.IoPuts, []},
176+
{Credo.Check.Refactor.MapMap, []},
177+
{Credo.Check.Refactor.ModuleDependencies, []},
178+
{Credo.Check.Refactor.NegatedIsNil, []},
179+
{Credo.Check.Refactor.PipeChainStart, []},
180+
{Credo.Check.Refactor.RejectReject, []},
181+
{Credo.Check.Refactor.VariableRebinding, []},
182+
{Credo.Check.Warning.LazyLogging, []},
183+
{Credo.Check.Warning.LeakyEnvironment, []},
184+
{Credo.Check.Warning.MapGetUnsafePass, []},
185+
{Credo.Check.Warning.MixEnv, []},
186+
{Credo.Check.Warning.UnsafeToAtom, []}
187+
]
188+
}
189+
}
190+
]
191+
}

.dockerignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build artifacts
2+
/_build
3+
/cover
4+
/deps
5+
/doc
6+
*.ez
7+
*.beam
8+
9+
# Chat data
10+
.chat_data*.etf
11+
12+
# Git
13+
.git
14+
.gitignore
15+
16+
# IDE
17+
.vscode
18+
.idea
19+
.elixir_ls
20+
21+
# Documentation
22+
*.md
23+
!README.md
24+
25+
# CI/CD
26+
.github
27+
28+
# OS
29+
.DS_Store
30+
Thumbs.db
31+
32+
# Tests
33+
/test
34+
35+
# Development
36+
.formatter.exs
37+
.credo.exs

.formatter.exs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
4+
line_length: 98
5+
]
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Run command '...'
15+
2. Enter input '...'
16+
3. See error
17+
18+
## Expected Behavior
19+
A clear and concise description of what you expected to happen.
20+
21+
## Actual Behavior
22+
What actually happened.
23+
24+
## Environment
25+
- OS: [e.g. Ubuntu 22.04, macOS 13.0]
26+
- Elixir version: [e.g. 1.15.0]
27+
- Erlang/OTP version: [e.g. 26.0]
28+
- Chat Simulator version: [e.g. 0.1.0]
29+
30+
## Error Messages
31+
```
32+
Paste any error messages or logs here
33+
```
34+
35+
## Additional Context
36+
Add any other context about the problem here.
37+
38+
## Possible Solution
39+
If you have suggestions on how to fix the bug, please describe them here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Question or Discussion
4+
url: https://github.com/codeforgood-org/elixir-chat-sim/discussions
5+
about: Ask questions or discuss ideas with the community
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Documentation
3+
about: Report missing, unclear, or incorrect documentation
4+
title: '[DOCS] '
5+
labels: documentation
6+
assignees: ''
7+
---
8+
9+
## Documentation Issue
10+
Describe what documentation is missing, unclear, or incorrect.
11+
12+
## Location
13+
Where did you encounter this issue?
14+
- [ ] README.md
15+
- [ ] Module documentation
16+
- [ ] Function documentation
17+
- [ ] CONTRIBUTING.md
18+
- [ ] Code comments
19+
- [ ] Other: [specify]
20+
21+
## Current State
22+
What is currently written (if applicable)?
23+
24+
## Suggested Improvement
25+
What should the documentation say instead? How could it be clearer?
26+
27+
## Additional Context
28+
Add any other context, examples, or screenshots about the documentation issue.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
A clear and concise description of the feature you'd like to see.
11+
12+
## Problem Statement
13+
Describe the problem this feature would solve. Ex. I'm always frustrated when [...]
14+
15+
## Proposed Solution
16+
Describe the solution you'd like to see implemented.
17+
18+
## Alternatives Considered
19+
Describe any alternative solutions or features you've considered.
20+
21+
## Use Cases
22+
Describe specific use cases for this feature:
23+
1. As a [user type], I want to [action] so that [benefit]
24+
2. ...
25+
26+
## Implementation Ideas
27+
If you have ideas about how this could be implemented, share them here.
28+
29+
## Additional Context
30+
Add any other context, screenshots, or examples about the feature request here.
31+
32+
## Acceptance Criteria
33+
What would make this feature complete?
34+
- [ ] Criterion 1
35+
- [ ] Criterion 2
36+
- [ ] Documentation updated
37+
- [ ] Tests added

0 commit comments

Comments
 (0)