Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report a more explicit error on indentation issues #379

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

viraptor
Copy link
Contributor

@viraptor viraptor commented Mar 1, 2024

When a template parameter is accidentially unindented, the stack attributes become empty. This resulted in:

lib/stack_master/config.rb:123:in `block (2 levels) in load_stacks':
undefined method `[]' for nil:NilClass (NoMethodError)

          stack_attributes['allowed_accounts'] = attributes['allowed_accounts'] if attributes['allowed_accounts']

Now it will report a ConfigParseError with a more specific message.

When a template parameter is accidentially unindented, the stack
attributes become empty. This resulted in:

```
lib/stack_master/config.rb:123:in `block (2 levels) in load_stacks':
undefined method `[]' for nil:NilClass (NoMethodError)

          stack_attributes['allowed_accounts'] = attributes['allowed_accounts'] if attributes['allowed_accounts']
```

Now it will report a ConfigParseError with a more specific message.
spec/stack_master/config_spec.rb Outdated Show resolved Hide resolved
Co-authored-by: Orien Madgwick <[email protected]>
@viraptor viraptor merged commit bb19246 into master Mar 6, 2024
18 checks passed
@viraptor viraptor deleted the viraptor/indent-error branch March 6, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants