nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: reviewdog/reviewdog
Pull request #696 (2020-07-25 16:15:05)

github-pr-review: fix rnd position with column == 1 handling
It actually should use the end line as-is. For example, if a suggestion
want to remove line-break, the end line actually needs to be the line after
the line-break.


- [x] Updated Unreleased section in [CHANGELOG](https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md) or it's not notable changes.


Patch:
diff --git a/service/github/github.go b/service/github/github.go
index d2ae0a3a..fc9005ad 100644
--- a/service/github/github.go
+++ b/service/github/github.go
@@ -152,11 +152,6 @@ func buildDraftReviewComment(c *reviewdog.Comment, body string) *github.DraftRev
 func githubCommentLine(c *reviewdog.Comment) int {
 	loc := c.Result.Diagnostic.GetLocation()
 	line := loc.GetRange().GetEnd().GetLine()
-	// End position with column == 1 means range to the end of the previous lines
-	// including line-break.
-	if loc.GetRange().GetEnd().GetColumn() == 1 {
-		line--
-	}
 	if line == 0 {
 		line = loc.GetRange().GetStart().GetLine()
 	}
@@ -284,7 +279,7 @@ func buildSingleSuggestion(c *reviewdog.Comment, s *rdf.Suggestion) (string, err
 		return "", fmt.Errorf("the Diagnostic's lines and Suggestion lines must be the same. %d-%d v.s. %d-%d",
 			drange.GetStart().GetLine(), drange.GetEnd().GetLine(), start.GetLine(), end.GetLine())
 	}
-	if start.GetColumn() > 1 || end.GetColumn() > 1 {
+	if start.GetColumn() > 0 || end.GetColumn() > 0 {
 		// TODO(haya14busa): Support non-line based suggestion.
 		return "", errors.New("non line based suggestions (contains column) are not supported yet")
 	}


Test patch:
diff --git a/service/github/github_test.go b/service/github/github_test.go
index d35be0dc..2fcef972 100644
--- a/service/github/github_test.go
+++ b/service/github/github_test.go
@@ -236,7 +236,7 @@ func TestGitHubPullRequest_Post_Flush_review_api(t *testing.T) {
 				{
 					Path:      github.String("reviewdog.go"),
 					StartLine: github.Int(15),
-					Line:      github.Int(16),
+					Line:      github.Int(17),
 					Body:      github.String(commentutil.BodyPrefix + "\nmultiline existing comment (line-break)"),
 				},
 			}
Repository: reviewdog/reviewdog
Pull request #1707 (2024-04-08 23:56:36)

Fix: no longer fails if it runs in GitHub Actions and does not use the annotation reporter
- [x] Updated Unreleased section in [CHANGELOG](https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md) or it's not notable changes.

https://github.com/reviewdog/reviewdog/actions/runs/8603011226/job/23573884918?pr=1697

When I submit a pull request from a forked repository, CI `reviewdog` fails.
Therefore, I fix to no longer fails if it runs in GitHub Actions and does not use the annotation reporter.


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8642cd6..0adc0a17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - ...
 
 ### :bug: Fixes
-- ...
+- Fix: no longer fails if it runs in GitHub Actions and does not use the annotation reporter
 
 ### :rotating_light: Breaking changes
 - ...
diff --git a/cmd/reviewdog/doghouse.go b/cmd/reviewdog/doghouse.go
index 3cf75604..13e1e837 100644
--- a/cmd/reviewdog/doghouse.go
+++ b/cmd/reviewdog/doghouse.go
@@ -226,14 +226,11 @@ github-pr-check reporter as a fallback.
 				continue
 			}
 			foundNumOverall++
-			// If it's not running in GitHub Actions, reviewdog should exit with 1
+			// If it's not running in GitHub Actions and not using the annotation reporter, reviewdog should exit with 1
 			// if there are at least one result in diff regardless of error level.
-			shouldFail = shouldFail || !cienv.IsInGitHubAction() ||
+			shouldFail = shouldFail || (!cienv.IsInGitHubAction() && !useAnnotationReporter) ||
 				!(results.Level == "warning" || results.Level == "info")
 
-			// If using the annotation reporter, the action should fail
-			shouldFail = shouldFail || !useAnnotationReporter
-
 			if foundNumOverall == githubutils.MaxLoggingAnnotationsPerStep {
 				githubutils.WarnTooManyAnnotationOnce()
 				shouldFail = true


Test patch:
diff --git a/cmd/reviewdog/doghouse_test.go b/cmd/reviewdog/doghouse_test.go
index 49c2dc18..e7ee60af 100644
--- a/cmd/reviewdog/doghouse_test.go
+++ b/cmd/reviewdog/doghouse_test.go
@@ -484,9 +484,14 @@ func TestReportResults_inGitHubAction(t *testing.T) {
 				ShouldReport: true,
 			},
 		},
+		Level: "info",
 	})
 	stdout := new(bytes.Buffer)
-	_ = reportResults(stdout, filteredResultSet, false)
+	foundResultShouldReport := reportResults(stdout, filteredResultSet, false)
+	if foundResultShouldReport {
+		t.Errorf("foundResultShouldReport = %v, want false", foundResultShouldReport)
+	}
+
 	want := `reviewdog: Reporting results for "name1"
 `
 	if got := stdout.String(); got != want {
Repository: reviewdog/reviewdog
Pull request #1771 (2024-06-09 13:31:36)

rdf: Discard unknown fields when unmarshalling JSON data
Old reviewdog binaries should succeed in parseing given rdjson/rdjsonl
correctly when RDFormat is updated and new fields are added.

- [x] Updated Unreleased section in [CHANGELOG](https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md) or it's not notable changes.




Patch:
diff --git a/parser/rdjson.go b/parser/rdjson.go
index efd41acf..de2083c8 100644
--- a/parser/rdjson.go
+++ b/parser/rdjson.go
@@ -26,7 +26,7 @@ func (p *RDJSONParser) Parse(r io.Reader) ([]*rdf.Diagnostic, error) {
 		return nil, err
 	}
 	var dr rdf.DiagnosticResult
-	if err := protojson.Unmarshal(b, &dr); err != nil {
+	if err := (protojson.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(b, &dr); err != nil {
 		return nil, fmt.Errorf("failed to unmarshal rdjson (DiagnosticResult): %w", err)
 	}
 	for _, d := range dr.Diagnostics {
diff --git a/parser/rdjsonl.go b/parser/rdjsonl.go
index 29f9578c..e1e93bc3 100644
--- a/parser/rdjsonl.go
+++ b/parser/rdjsonl.go
@@ -26,7 +26,7 @@ func (p *RDJSONLParser) Parse(r io.Reader) ([]*rdf.Diagnostic, error) {
 	s := bufio.NewScanner(r)
 	for s.Scan() {
 		d := new(rdf.Diagnostic)
-		if err := protojson.Unmarshal(s.Bytes(), d); err != nil {
+		if err := (protojson.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(s.Bytes(), d); err != nil {
 			return nil, fmt.Errorf("failed to unmarshal rdjsonl (Diagnostic): %w", err)
 		}
 		if d.GetOriginalOutput() == "" {


Test patch:
diff --git a/parser/rdjson_test.go b/parser/rdjson_test.go
index b8e49272..94a6a2aa 100644
--- a/parser/rdjson_test.go
+++ b/parser/rdjson_test.go
@@ -75,7 +75,8 @@ func ExampleRDJSONParser() {
           }
         }
       },
-      "severity": 1
+      "severity": 1,
+      "unknown_field": "this field will be ignored"
     }
   ]
 }`
diff --git a/parser/rdjsonl_test.go b/parser/rdjsonl_test.go
index cb701cf9..8b95d847 100644
--- a/parser/rdjsonl_test.go
+++ b/parser/rdjsonl_test.go
@@ -12,7 +12,7 @@ func TestRDJSONLParser(t *testing.T) {
 {"source":{"name":"ineffassign"},"message":"ineffectual assignment to 'x'","location":{"path":"testdata/main.go","range":{"start":{"line":12,"column":2}}}}
 {"source":{"name":"govet"},"message":"printf: Sprintf format %d reads arg #1, but call has 0 args","location":{"path":"testdata/main.go","range":{"start":{"line":13,"column":2}}}}
 {"source":{"name":"severity-test"},"message":"severity test (string)","location":{"path":"testdata/main.go","range":{"start":{"line":24,"column":6}}}, "severity": "WARNING"}
-{"source":{"name":"severity-test"},"message":"severity test (number)","location":{"path":"testdata/main.go","range":{"start":{"line":24,"column":6}}}, "severity": "WARNING"}`
+{"source":{"name":"severity-test"},"message":"severity test (number)","location":{"path":"testdata/main.go","range":{"start":{"line":24,"column":6}}}, "severity": "WARNING", "unknown_field": "this field will be ignored"}`
 	sampleLines := strings.Split(sample, "\n")
 	p := NewRDJSONLParser()
 	diagnostics, err := p.Parse(strings.NewReader(sample))
Repository: Shopify/sarama
Pull request #1701 (2020-05-12 22:24:09)

Set server name only for the current broker
Fixes https://github.com/Shopify/sarama/issues/1700


Patch:
diff --git a/broker.go b/broker.go
index cda5da8..232559a 100644
--- a/broker.go
+++ b/broker.go
@@ -162,29 +162,11 @@ func (b *Broker) Open(conf *Config) error {
 			atomic.StoreInt32(&b.opened, 0)
 			return
 		}
-
 		if conf.Net.TLS.Enable {
-			Logger.Printf("Using tls")
-			cfg := conf.Net.TLS.Config
-			if cfg == nil {
-				cfg = &tls.Config{}
-			}
-			// If no ServerName is set, infer the ServerName
-			// from the hostname we're connecting to.
-			// Gets the hostname as tls.DialWithDialer does it.
-			if cfg.ServerName == "" {
-				colonPos := strings.LastIndex(b.addr, ":")
-				if colonPos == -1 {
-					colonPos = len(b.addr)
-				}
-				hostname := b.addr[:colonPos]
-				cfg.ServerName = hostname
-			}
-			b.conn = tls.Client(b.conn, cfg)
+			b.conn = tls.Client(b.conn, validServerNameTLS(b.addr, conf.Net.TLS.Config))
 		}
 
 		b.conn = newBufConn(b.conn)
-
 		b.conf = conf
 
 		// Create or reuse the global metrics shared between brokers
@@ -1440,3 +1422,20 @@ func (b *Broker) registerCounter(name string) metrics.Counter {
 	b.registeredMetrics = append(b.registeredMetrics, nameForBroker)
 	return metrics.GetOrRegisterCounter(nameForBroker, b.conf.MetricRegistry)
 }
+
+func validServerNameTLS(addr string, cfg *tls.Config) *tls.Config {
+	if cfg == nil {
+		cfg = &tls.Config{}
+	}
+	if cfg.ServerName != "" {
+		return cfg
+	}
+
+	c := cfg.Clone()
+	sn, _, err := net.SplitHostPort(addr)
+	if err != nil {
+		Logger.Println(fmt.Errorf("failed to get ServerName from addr %w", err))
+	}
+	c.ServerName = sn
+	return c
+}


Test patch:
diff --git a/client_tls_test.go b/client_tls_test.go
index 7501456..9731e44 100644
--- a/client_tls_test.go
+++ b/client_tls_test.go
@@ -210,3 +210,22 @@ func doListenerTLSTest(t *testing.T, expectSuccess bool, serverConfig, clientCon
 		}
 	}
 }
+
+func TestSetServerName(t *testing.T) {
+	if validServerNameTLS("kafka-server.domain.com:9093", nil).ServerName != "kafka-server.domain.com" {
+		t.Fatal("Expected kafka-server.domain.com as tls.ServerName when tls config is nil")
+	}
+
+	if validServerNameTLS("kafka-server.domain.com:9093", &tls.Config{}).ServerName != "kafka-server.domain.com" {
+		t.Fatal("Expected kafka-server.domain.com as tls.ServerName when tls config ServerName is not provided")
+	}
+
+	c := &tls.Config{ServerName: "kafka-server-other.domain.com"}
+	if validServerNameTLS("", c).ServerName != "kafka-server-other.domain.com" {
+		t.Fatal("Expected kafka-server-other.domain.com as tls.ServerName when tls config ServerName is provided")
+	}
+
+	if validServerNameTLS("host-no-port", nil).ServerName != "" {
+		t.Fatal("Expected empty ServerName as the broker addr is missing the port")
+	}
+}
Repository: Shopify/sarama
Pull request #1747 (2020-07-10 08:38:05)

fix: mock sync producer does not handle the offset while sending messages
Mock sync producer does not handle the offset while invoking `SendMessages`.

e.g.

```go
mockSyncProducer := mocks.NewSyncProducer(t, sarama.NewConfig())

msgs := []*sarama.ProducerMessage{
	{Key: sarama.StringEncoder("foo")},
}
mockSyncProducer.SendMessages(msgs)
// Print offset
print(msgs[0].Offset)
```


Patch:
diff --git a/mocks/sync_producer.go b/mocks/sync_producer.go
index 3f4986e..8a089e0 100644
--- a/mocks/sync_producer.go
+++ b/mocks/sync_producer.go
@@ -97,6 +97,8 @@ func (sp *SyncProducer) SendMessages(msgs []*sarama.ProducerMessage) error {
 			if expectation.Result != errProduceSuccess {
 				return expectation.Result
 			}
+			sp.lastOffset++
+			msgs[i].Offset = sp.lastOffset
 		}
 		return nil
 	}


Test patch:
diff --git a/mocks/sync_producer_test.go b/mocks/sync_producer_test.go
index bf2c71a..0e47ddd 100644
--- a/mocks/sync_producer_test.go
+++ b/mocks/sync_producer_test.go
@@ -161,6 +161,13 @@ func TestSyncProducerWithCheckerFunctionForSendMessagesWithoutError(t *testing.T
 		t.Error("No error expected on SendMessages call, found: ", err)
 	}
 
+	for i, msg := range msgs {
+		offset := int64(i + 1)
+		if offset != msg.Offset {
+			t.Errorf("The message should have been assigned offset %d, but got %d", offset, msg.Offset)
+		}
+	}
+
 	if err := sp.Close(); err != nil {
 		t.Error(err)
 	}
Repository: Shopify/sarama
Pull request #1781 (2020-08-18 14:22:20)

Refresh brokers given list of seed brokers
`RefreshBrokers` takes a list of addresses to be used as seed brokers.
Existing broker connections are closed and the updated list of seed brokers will be used for the next metadata fetch.

`RefreshBrokers` can be used in the case of failovers when the Kafka cluster's DNS would have to be re-resolved


Patch:
diff --git a/client.go b/client.go
index b295193..b80cc59 100644
--- a/client.go
+++ b/client.go
@@ -56,6 +56,11 @@ type Client interface {
 	// partition. Offline replicas are replicas which are offline
 	OfflineReplicas(topic string, partitionID int32) ([]int32, error)
 
+	// RefreshBrokers takes a list of addresses to be used as seed brokers.
+	// Existing broker connections are closed and the updated list of seed brokers
+	// will be used for the next metadata fetch.
+	RefreshBrokers(addrs []string) error
+
 	// RefreshMetadata takes a list of topics and queries the cluster to refresh the
 	// available metadata for those topics. If no topics are provided, it will refresh
 	// metadata for all topics.
@@ -429,6 +434,30 @@ func (client *client) Leader(topic string, partitionID int32) (*Broker, error) {
 	return leader, err
 }
 
+func (client *client) RefreshBrokers(addrs []string) error {
+	if client.Closed() {
+		return ErrClosedClient
+	}
+
+	client.lock.Lock()
+	defer client.lock.Unlock()
+
+	for _, broker := range client.brokers {
+		_ = broker.Close()
+		delete(client.brokers, broker.ID())
+	}
+
+	client.seedBrokers = nil
+	client.deadSeeds = nil
+
+	random := rand.New(rand.NewSource(time.Now().UnixNano()))
+	for _, index := range random.Perm(len(addrs)) {
+		client.seedBrokers = append(client.seedBrokers, NewBroker(addrs[index]))
+	}
+
+	return nil
+}
+
 func (client *client) RefreshMetadata(topics ...string) error {
 	if client.Closed() {
 		return ErrClosedClient


Test patch:
diff --git a/client_test.go b/client_test.go
index 9eee454..9b42e2d 100644
--- a/client_test.go
+++ b/client_test.go
@@ -515,6 +515,37 @@ func TestClientRefreshBehaviour(t *testing.T) {
 	safeClose(t, client)
 }
 
+func TestClientRefreshBrokers(t *testing.T) {
+	initialSeed := NewMockBroker(t, 0)
+	leader := NewMockBroker(t, 5)
+
+	metadataResponse1 := new(MetadataResponse)
+	metadataResponse1.AddBroker(leader.Addr(), leader.BrokerID())
+	metadataResponse1.AddBroker(initialSeed.Addr(), initialSeed.BrokerID())
+	initialSeed.Returns(metadataResponse1)
+
+	c, err := NewClient([]string{initialSeed.Addr()}, nil)
+	client := c.(*client)
+
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if len(client.Brokers()) != 2 {
+		t.Error("Meta broker is not 2")
+	}
+
+	newSeedBrokers := []string{"localhost:12345"}
+	_ = client.RefreshBrokers(newSeedBrokers)
+
+	if client.seedBrokers[0].addr != newSeedBrokers[0] {
+		t.Error("Seed broker not updated")
+	}
+	if len(client.Brokers()) != 0 {
+		t.Error("Old brokers not closed")
+	}
+}
+
 func TestClientRefreshMetadataBrokerOffline(t *testing.T) {
 	seedBroker := NewMockBroker(t, 1)
 	leader := NewMockBroker(t, 5)
Repository: Shopify/themekit
Pull request #637 (2019-05-21 15:13:24)

Better download errors
related #631 

This just adds asset names to the error responses in download so that it is clear which files are raising errors.


Patch:
diff --git a/cmd/download.go b/cmd/download.go
index de7a9d1..be29d1b 100644
--- a/cmd/download.go
+++ b/cmd/download.go
@@ -44,9 +44,9 @@ func download(ctx *cmdutil.Ctx) error {
 			defer ctx.DoneTask()
 			defer downloadGroup.Done()
 			if asset, err := ctx.Client.GetAsset(filename); err != nil {
-				ctx.Err("[%s] error downloading asset: %s", colors.Green(ctx.Env.Name), err)
+				ctx.Err("[%s] error downloading %s: %s", colors.Green(ctx.Env.Name), colors.Blue(filename), err)
 			} else if err = asset.Write(ctx.Env.Directory); err != nil {
-				ctx.Err("[%s] error writing asset: %s", colors.Green(ctx.Env.Name), err)
+				ctx.Err("[%s] error writing %s: %s", colors.Green(ctx.Env.Name), colors.Blue(filename), err)
 			} else if ctx.Flags.Verbose {
 				ctx.Log.Printf("[%s] Successfully wrote %s to disk", colors.Green(ctx.Env.Name), colors.Blue(filename))
 			}
diff --git a/src/env/env.go b/src/env/env.go
index 38b8cc9..b6e582f 100644
--- a/src/env/env.go
+++ b/src/env/env.go
@@ -60,7 +60,7 @@ func (env *Env) validate() error {
 
 	if len(env.Domain) == 0 {
 		errors = append(errors, "missing store domain")
-	} else if !strings.HasSuffix(env.Domain, "myshopify.com") {
+	} else if !strings.HasSuffix(env.Domain, "myshopify.com") && !strings.HasSuffix(env.Domain, "myshopify.io") {
 		errors = append(errors, "invalid store domain must end in '.myshopify.com'")
 	}
 


Test patch:
diff --git a/cmd/download_test.go b/cmd/download_test.go
index b0c4b58..de3fa89 100644
--- a/cmd/download_test.go
+++ b/cmd/download_test.go
@@ -18,7 +18,7 @@ func TestDownload(t *testing.T) {
 	client.On("GetAsset", mock.MatchedBy(func(string) bool { return true })).Return(shopify.Asset{}, nil).Times(len(allFilenames))
 	err := download(ctx)
 	assert.Nil(t, err)
-	assert.Contains(t, stdErr.String(), "error writing asset")
+	assert.Contains(t, stdErr.String(), "error writing assets/logo.png")
 
 	ctx, client, _, _, _ = createTestCtx()
 	client.On("GetAllAssets").Return(allFilenames, fmt.Errorf("server error"))
@@ -31,7 +31,7 @@ func TestDownload(t *testing.T) {
 	client.On("GetAllAssets").Return(allFilenames, nil)
 	client.On("GetAsset", mock.MatchedBy(func(string) bool { return true })).Return(shopify.Asset{}, fmt.Errorf("asset err"))
 	assert.Nil(t, download(ctx))
-	assert.Contains(t, stdErr.String(), "error downloading asset")
+	assert.Contains(t, stdErr.String(), "error downloading assets/logo.png")
 }
 
 func TestFilesToDownload(t *testing.T) {
Repository: ember-template-lint/ember-template-lint
Pull request #382 (2018-04-04 07:51:11)

Fix linter for mustaches containing only string literal
Mustaches containing only string literal are legal. I found them useful when in, say, addon dummy app I want to render readable html, it's easy to do 

`{{"<div>example text</div>"}}`

When `isMultipartPath` finds template code like this, it receives something like

```
{ type: 'StringLiteral',
  value: '<div>example text</div>',
  original: '<div>example text</div>',
  loc:
   { source: null,
     start: { line: 1, column: 2 },
     end: { line: 1, column: 14 } } }
```

Which contains no `parts`, this generating error. I simply added a guard against this case.

rwjblue: Would you mind rebasing to get CI to run? When you submitted the PR originally we were having an issue with CI...

Patch:
diff --git a/lib/plugins/transform-dot-component-invocation.js b/lib/plugins/transform-dot-component-invocation.js
index 312cff59..92be5e87 100644
--- a/lib/plugins/transform-dot-component-invocation.js
+++ b/lib/plugins/transform-dot-component-invocation.js
@@ -43,7 +43,7 @@ module.exports = function transformDotComponentInvocation(env) {
 };
 
 function isMultipartPath(path)  {
-  return path.parts.length > 1;
+  return path.parts && path.parts.length > 1;
 }
 
 function isInlineInvocation(path, params, hash) {


Test patch:
diff --git a/test/unit/rules/lint-block-indentation-test.js b/test/unit/rules/lint-block-indentation-test.js
index 2c5864eb..9de1729a 100644
--- a/test/unit/rules/lint-block-indentation-test.js
+++ b/test/unit/rules/lint-block-indentation-test.js
@@ -195,7 +195,10 @@ generateRuleTests({
       '\uFEFF{{#if foo}}',
       '  <div></div>',
       '{{/if}}'
-    ].join('\n')
+    ].join('\n'),
+    [
+      '{{\'this works\'}}'
+    ].join('\n'),
   ],
 
   bad: [
Repository: ember-template-lint/ember-template-lint
Pull request #403 (2018-05-01 16:27:19)

Failing test case for block component inside contextual component
Adds a failing test case for the issue discussed in https://github.com/ember-template-lint/ember-template-lint/issues/402.




Patch:
diff --git a/lib/plugins/transform-dot-component-invocation.js b/lib/plugins/transform-dot-component-invocation.js
index 92be5e87..aaa15971 100644
--- a/lib/plugins/transform-dot-component-invocation.js
+++ b/lib/plugins/transform-dot-component-invocation.js
@@ -61,4 +61,6 @@ function wrapInComponent(node, builder) {
   let componentHelper = builder.path('component');
   node.path = componentHelper;
   node.params.unshift(component);
+
+  node._isContextualComponent = true;
 }
diff --git a/lib/rules/lint-block-indentation.js b/lib/rules/lint-block-indentation.js
index e721d1da..daee5e99 100644
--- a/lib/rules/lint-block-indentation.js
+++ b/lib/rules/lint-block-indentation.js
@@ -164,6 +164,10 @@ module.exports = class BlockIndentation extends Rule {
     let startColumn = node.loc.start.column;
     let endColumn   = node.loc.end.column;
 
+    if (node._isContextualComponent) {
+      displayName = node.params[0].original;
+    }
+
     let controlCharCount = this.endingControlCharCount(node);
     let correctedEndColumn = endColumn - displayName.length - controlCharCount;
 


Test patch:
diff --git a/test/unit/rules/lint-block-indentation-test.js b/test/unit/rules/lint-block-indentation-test.js
index a163af9f..38fc403f 100644
--- a/test/unit/rules/lint-block-indentation-test.js
+++ b/test/unit/rules/lint-block-indentation-test.js
@@ -199,6 +199,15 @@ generateRuleTests({
     [
       '{{\'this works\'}}'
     ].join('\n'),
+    [
+      '{{#foo-bar as |baz|}}',
+      '  {{#baz.content}}',
+      '    {{#component "foo-bar"}}',
+      '      Content',
+      '    {{/component}}',
+      '  {{/baz.content}}',
+      '{{/foo-bar}}'
+    ].join('\n'),
   ],
 
   bad: [