Skip to content

Commit 0a4b1de

Browse files
committed
Update usage rules
1 parent 3673af3 commit 0a4b1de

File tree

7 files changed

+635
-53
lines changed

7 files changed

+635
-53
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ erl_crash.dump
3838
/priv
3939
.sobelow*
4040
/config
41+
42+
# Claude Code
43+
CLAUDE.md

lib/nebulex/caching/decorators.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ if Code.ensure_loaded?(Decorator.Define) do
730730
}
731731

732732
# Context struct
733-
defstruct decorator: nil, module: nil, function_name: nil, arity: 0, args: []
733+
defstruct [:decorator, :module, :function_name, arity: 0, args: []]
734734
end
735735

736736
# Decorator definitions

lib/nebulex/event/cache_entry_event.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ defmodule Nebulex.Event.CacheEntryEvent do
6060

6161
# Event structure
6262
@enforce_keys [:cache, :pid, :type, :target, :command]
63-
defstruct cache: nil, name: nil, pid: nil, type: nil, target: nil, command: nil, metadata: []
63+
defstruct [:cache, :name, :pid, :type, :target, :command, metadata: []]
6464

6565
# Supported event types
6666
@event_types ~w(deleted expired inserted updated)a

test/support/test_adapter.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Nebulex.TestAdapter do
66
defmodule Entry do
77
@moduledoc false
88

9-
defstruct value: nil, touched: nil, exp: nil
9+
defstruct [:value, :touched, :exp]
1010

1111
alias Nebulex.Time
1212

@@ -374,7 +374,7 @@ defmodule Nebulex.TestAdapter.KV do
374374
## Internals
375375

376376
# Internal state
377-
defstruct map: nil, adapter_meta: nil
377+
defstruct [:map, :adapter_meta]
378378

379379
## API
380380

usage-rules/THIRD_PARTY_LICENSES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,19 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6969
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
7070
SOFTWARE.
7171
```
72+
73+
---
74+
75+
## Elixir Style Guide
76+
77+
**Source**: https://github.com/christopheradams/elixir_style_guide
78+
79+
**Files affected**: `elixir-style.md`
80+
81+
**License**: Creative Commons Attribution 3.0 Unported (CC-BY-3.0)
82+
83+
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
84+
85+
https://creativecommons.org/licenses/by/3.0/
86+
87+
Copyright (c) Christopher Adams and contributors.

0 commit comments

Comments
 (0)