liveview-native / liveview-native/live_view_native_stylesheet

Incorrect LOC reported for syntax error

Open
#50 8 comments 0 reactions 1 assignee View on GitHub

@NduatiK is already working on this.

Since Jan 21, 2024.

Dominant language
Elixir
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Using the following stylesheet:

```elixir
defmodule LvnWeb.AppStyles do
use LiveViewNative.Stylesheet, :swiftui

~SHEET"""
"clip:circle" do
clipShape(.circle)
end

"image-scale:" <> size do
imageScale(.large)
end
"""
end
```

and I get the following error:

```
Compiling 3 files (.ex)
warning: variable "size" is unused (if the variable is not meant to be used, prefix it with an underscore)

5 │ "clip:circle" do
│ ~~~~~~~~~~~~~~~~

└─ (lvn 0.1.0) lib/lvn_web/styles/app_styles.ex:5: LvnWeb.AppStyles.class/2
```

the warning should be reported for the 2nd block, not the first.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.