nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: Shopify/sarama
Pull request #1374 (2019-05-14 11:37:27)

support ListConsumerGroupOffsets without topicPartition
According to [this](https://cwiki.apache.org/confluence/display/KAFKA/KIP-88%3A+OffsetFetch+Protocol+Update) it is possible to send an OffsetFetch Request with `Version 2` starting from kafka version `0.10.2.0`.
This allows to send `nil` as parameter `topicPartitions` and returns offsets for all topicPartitions available.

my pull request implements this.


Patch:
diff --git a/admin.go b/admin.go
index d88a0a4..f212c85 100644
--- a/admin.go
+++ b/admin.go
@@ -608,7 +608,9 @@ func (ca *clusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions m
 		partitions:    topicPartitions,
 	}
 
-	if ca.conf.Version.IsAtLeast(V0_8_2_2) {
+	if ca.conf.Version.IsAtLeast(V0_10_2_0) {
+		request.Version = 2
+	} else if ca.conf.Version.IsAtLeast(V0_8_2_2) {
 		request.Version = 1
 	}
 
diff --git a/mockresponses.go b/mockresponses.go
index 919d8bb..0c08f6a 100644
--- a/mockresponses.go
+++ b/mockresponses.go
@@ -574,6 +574,7 @@ func (mr *MockProduceResponse) getError(topic string, partition int32) KError {
 // MockOffsetFetchResponse is a `OffsetFetchResponse` builder.
 type MockOffsetFetchResponse struct {
 	offsets map[string]map[string]map[int32]*OffsetFetchResponseBlock
+	error   KError
 	t       TestReporter
 }
 
@@ -599,15 +600,25 @@ func (mr *MockOffsetFetchResponse) SetOffset(group, topic string, partition int3
 	return mr
 }
 
+func (mr *MockOffsetFetchResponse) SetError(kerror KError) *MockOffsetFetchResponse {
+	mr.error = kerror
+	return mr
+}
+
 func (mr *MockOffsetFetchResponse) For(reqBody versionedDecoder) encoder {
 	req := reqBody.(*OffsetFetchRequest)
 	group := req.ConsumerGroup
-	res := &OffsetFetchResponse{}
+	res := &OffsetFetchResponse{Version: req.Version}
+
 	for topic, partitions := range mr.offsets[group] {
 		for partition, block := range partitions {
 			res.AddBlock(topic, partition, block)
 		}
 	}
+
+	if res.Version >= 2 {
+		res.Err = mr.error
+	}
 	return res
 }
 


Test patch:
diff --git a/admin_test.go b/admin_test.go
index aafb148..0134770 100644
--- a/admin_test.go
+++ b/admin_test.go
@@ -822,7 +822,7 @@ func TestListConsumerGroupOffsets(t *testing.T) {
 	expectedOffset := int64(0)
 
 	seedBroker.SetHandlerByMap(map[string]MockResponse{
-		"OffsetFetchRequest": NewMockOffsetFetchResponse(t).SetOffset(group, "my-topic", partition, expectedOffset, "", ErrNoError),
+		"OffsetFetchRequest": NewMockOffsetFetchResponse(t).SetOffset(group, "my-topic", partition, expectedOffset, "", ErrNoError).SetError(ErrNoError),
 		"MetadataRequest": NewMockMetadataResponse(t).
 			SetController(seedBroker.BrokerID()).
 			SetBroker(seedBroker.Addr(), seedBroker.BrokerID()),
Repository: Shopify/sarama
Pull request #1383 (2019-05-29 12:02:38)

bug: handle and log throttled FetchResponses
Kafka 2.2 returns a throttled FetchResponse with an empty array of topics.
Previously Sarama treated this as an ErrIncompleteResponse and would
abandon and re-create the subscription instead of retrying the
FetchRequest.


Patch:
diff --git a/consumer.go b/consumer.go
index 461026e..4718a7d 100644
--- a/consumer.go
+++ b/consumer.go
@@ -561,6 +561,14 @@ func (child *partitionConsumer) parseResponse(response *FetchResponse) ([]*Consu
 		consumerBatchSizeMetric = getOrRegisterHistogram("consumer-batch-size", metricRegistry)
 	}
 
+	// If request was throttled and empty we log and return without error
+	if response.ThrottleTime != time.Duration(0) && len(response.Blocks) == 0 {
+		Logger.Printf(
+			"consumer/broker/%d FetchResponse throttled %v\n",
+			child.broker.broker.ID(), response.ThrottleTime)
+		return nil, nil
+	}
+
 	block := response.GetBlock(child.topic, child.partition)
 	if block == nil {
 		return nil, ErrIncompleteResponse


Test patch:
diff --git a/consumer_test.go b/consumer_test.go
index c7b1cc1..4107dfa 100644
--- a/consumer_test.go
+++ b/consumer_test.go
@@ -4,6 +4,7 @@ import (
 	"log"
 	"os"
 	"os/signal"
+	"reflect"
 	"sync"
 	"sync/atomic"
 	"testing"
@@ -1240,3 +1241,49 @@ ConsumerLoop:
 
 	log.Printf("Consumed: %d\n", consumed)
 }
+
+func Test_partitionConsumer_parseResponse(t *testing.T) {
+	type args struct {
+		response *FetchResponse
+	}
+	tests := []struct {
+		name    string
+		args    args
+		want    []*ConsumerMessage
+		wantErr bool
+	}{
+		{
+			name: "empty but throttled FetchResponse is not considered an error",
+			args: args{
+				response: &FetchResponse{
+					ThrottleTime: time.Millisecond,
+				},
+			},
+		},
+		{
+			name: "empty FetchResponse is considered an incomplete response by default",
+			args: args{
+				response: &FetchResponse{},
+			},
+			wantErr: true,
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			child := &partitionConsumer{
+				broker: &brokerConsumer{
+					broker: &Broker{},
+				},
+				conf: &Config{},
+			}
+			got, err := child.parseResponse(tt.args.response)
+			if (err != nil) != tt.wantErr {
+				t.Errorf("partitionConsumer.parseResponse() error = %v, wantErr %v", err, tt.wantErr)
+				return
+			}
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("partitionConsumer.parseResponse() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
Repository: ember-cli/ember-try
Pull request #994 (2024-12-03 17:23:38)

pnpm: Ignore scripts by default
Closes: https://github.com/ember-cli/ember-try/issues/993


Patch:
diff --git a/lib/dependency-manager-adapters/pnpm.js b/lib/dependency-manager-adapters/pnpm.js
index dff0d86..cabd276 100644
--- a/lib/dependency-manager-adapters/pnpm.js
+++ b/lib/dependency-manager-adapters/pnpm.js
@@ -122,6 +122,10 @@ module.exports = CoreObject.extend({
       if (!mgrOptions.includes('--no-lockfile')) {
         mgrOptions.push('--no-lockfile');
       }
+
+      if (!mgrOptions.includes('--ignore-scripts')) {
+        mgrOptions.push('--ignore-scripts');
+      }
     }
 
     // Note: We are explicitly *not* using `--no-lockfile` here, so that we


Test patch:
diff --git a/test/dependency-manager-adapters/pnpm-adapter-test.js b/test/dependency-manager-adapters/pnpm-adapter-test.js
index 40785ad..3fde519 100644
--- a/test/dependency-manager-adapters/pnpm-adapter-test.js
+++ b/test/dependency-manager-adapters/pnpm-adapter-test.js
@@ -121,7 +121,7 @@ describe('pnpm Adapter', () => {
       let stubbedRun = generateMockRun(
         [
           {
-            command: 'pnpm install --no-lockfile',
+            command: 'pnpm install --no-lockfile --ignore-scripts',
             async callback(command, args, opts) {
               runCount++;
               expect(opts).to.have.property('cwd', tmpdir);
@@ -226,7 +226,7 @@ describe('pnpm Adapter', () => {
       let stubbedRun = generateMockRun(
         [
           {
-            command: 'pnpm install --no-lockfile',
+            command: 'pnpm install --no-lockfile --ignore-scripts',
             async callback(command, args, opts) {
               runCount++;
               expect(opts).to.have.property('cwd', tmpdir);
Repository: ember-cli/eslint-plugin-ember
Pull request #857 (2020-06-16 19:14:40)

Ignore the left side of an assignment (nested path case) in `require-computed-property-dependencies` rule
Follow-up to #786.

CC: @mongoose700 


Patch:
diff --git a/lib/rules/require-computed-property-dependencies.js b/lib/rules/require-computed-property-dependencies.js
index 87fd7428..f9e7de66 100644
--- a/lib/rules/require-computed-property-dependencies.js
+++ b/lib/rules/require-computed-property-dependencies.js
@@ -5,6 +5,7 @@ const emberUtils = require('../utils/ember');
 const computedPropertyUtils = require('../utils/computed-properties');
 const javascriptUtils = require('../utils/javascript');
 const types = require('../utils/types');
+const utils = require('../utils/utils');
 const propertyGetterUtils = require('../utils/property-getter');
 const computedPropertyDependentKeyUtils = require('../utils/computed-property-dependent-keys');
 const assert = require('assert');
@@ -212,6 +213,31 @@ function findInjectedServiceNames(node) {
   return results;
 }
 
+/**
+ * Check whether a node is inside the left side of an AssignmentExpression.
+ *
+ * Example:
+ * - this.x.y = 123;
+ * Nodes in the left side of this example:
+ * - this
+ * - x
+ * - y
+ *
+ * @param {Node} node - node to check
+ * @returns {boolean} - whether the node is inside the left side of the given AssignmentExpression
+ */
+function isInLeftSideOfAssignmentExpression(node) {
+  return Boolean(
+    utils.getAncestor(
+      node,
+      (ancestor) =>
+        ancestor.parent &&
+        types.isAssignmentExpression(ancestor.parent) &&
+        ancestor === ancestor.parent.left
+    )
+  );
+}
+
 /**
  * Recursively finds all `this.property` usages.
  *
@@ -229,7 +255,7 @@ function findThisGetCalls(node) {
           (types.isCallExpression(parent) || types.isOptionalCallExpression(parent)) &&
           parent.callee === child
         ) &&
-        !(types.isAssignmentExpression(child.parent) && child === parent.left) && // Ignore the left side (x) of an assignment: this.x = 123;
+        !isInLeftSideOfAssignmentExpression(child) && // Ignore the left side (x) of an assignment: this.x = 123;
         propertyGetterUtils.isSimpleThisExpression(child)
       ) {
         results.push(child);


Test patch:
diff --git a/tests/lib/rules/require-computed-property-dependencies.js b/tests/lib/rules/require-computed-property-dependencies.js
index 74da53eb..8e5e1bb0 100644
--- a/tests/lib/rules/require-computed-property-dependencies.js
+++ b/tests/lib/rules/require-computed-property-dependencies.js
@@ -86,6 +86,8 @@ ruleTester.run('require-computed-property-dependencies', rule, {
     `,
     // Should ignore the left side of an assignment.
     "Ember.computed('right', function() { this.left = this.right; })",
+    // Should ignore the left side of an assignment with nested path.
+    "Ember.computed('right', function() { this.left1.left2 = this.right; })",
     // Explicit getter function:
     `
       computed('firstName', 'lastName', {
Repository: ember-cli/eslint-plugin-ember
Pull request #860 (2020-06-18 14:58:59)

Change confusing behavior of `hasDecorator` util
Changing this dangerous/confusing behavior. Note that this behavior is not currently used so there should be no impact.


Patch:
diff --git a/lib/utils/decorators.js b/lib/utils/decorators.js
index c7f8d44b..c78d66f6 100644
--- a/lib/utils/decorators.js
+++ b/lib/utils/decorators.js
@@ -28,7 +28,6 @@ function findDecorator(node, decoratorName) {
 
 /**
  * Check whether or not a node has at least the given decorator
- * If no decoratorName is provided, will return whether the node has any decorators at all
  *
  * @param {Object} node The node to check.
  * @param {string?} decoratorName The decorator to look for
@@ -38,9 +37,6 @@ function hasDecorator(node, decoratorName) {
   if (!node.decorators) {
     return false;
   }
-  if (!decoratorName) {
-    return true;
-  }
 
   return node.decorators.some((decorator) => {
     const expression = decorator.expression;


Test patch:
diff --git a/tests/lib/utils/decorators-test.js b/tests/lib/utils/decorators-test.js
index 2ffab9d3..dffb66a9 100644
--- a/tests/lib/utils/decorators-test.js
+++ b/tests/lib/utils/decorators-test.js
@@ -41,7 +41,7 @@ describe('hasDecorator', () => {
     {
       code: withDecorator,
       decoratorName: undefined,
-      expected: true,
+      expected: false,
     },
     {
       code: withDecorator,
Repository: ember-cli/eslint-plugin-ember
Pull request #919 (2020-08-18 22:36:35)

Fix crash with variable path in `route-path-style` rule
Avoids this crash:

```
TypeError: Cannot read property ‘split’ of undefined’ error.
```

CC: @mongoose700 


Patch:
diff --git a/lib/rules/route-path-style.js b/lib/rules/route-path-style.js
index 4e99e76e..656613dc 100644
--- a/lib/rules/route-path-style.js
+++ b/lib/rules/route-path-style.js
@@ -44,9 +44,12 @@ module.exports = {
         const pathValueNode = hasExplicitPathOption
           ? getPropertyByKeyName(node.arguments[1], 'path').value
           : node.arguments[0];
-        const pathValue = pathValueNode.value;
 
-        const urlSegments = getStaticURLSegments(pathValue);
+        if (!types.isStringLiteral(pathValueNode)) {
+          return;
+        }
+
+        const urlSegments = getStaticURLSegments(pathValueNode.value);
 
         if (urlSegments.some((urlPart) => !isKebabCase(urlPart))) {
           context.report(pathValueNode, ERROR_MESSAGE);


Test patch:
diff --git a/tests/lib/rules/route-path-style.js b/tests/lib/rules/route-path-style.js
index 6c0e4f1b..854b92ce 100644
--- a/tests/lib/rules/route-path-style.js
+++ b/tests/lib/rules/route-path-style.js
@@ -11,7 +11,12 @@ const { ERROR_MESSAGE } = rule;
 // Tests
 //------------------------------------------------------------------------------
 
-const ruleTester = new RuleTester();
+const ruleTester = new RuleTester({
+  parserOptions: {
+    ecmaVersion: 6,
+    sourceType: 'module',
+  },
+});
 ruleTester.run('route-path-style', rule, {
   valid: [
     // Implicit path:
@@ -78,6 +83,10 @@ ruleTester.run('route-path-style', rule, {
 
     // Incorrect usage:
     'this.route();',
+
+    // With variable:
+    "this.route('team', { path: myPath });",
+    "this.route('team', { path: `part-${some-variable}` });", // eslint-disable-line no-template-curly-in-string
   ],
   invalid: [
     {
Repository: ember-cli/eslint-plugin-ember
Pull request #929 (2020-09-07 17:31:47)

Fix spread syntax crash in `avoid-using-needs-in-controllers` rule


Patch:
diff --git a/lib/rules/avoid-using-needs-in-controllers.js b/lib/rules/avoid-using-needs-in-controllers.js
index d9fb8bef..58398cef 100644
--- a/lib/rules/avoid-using-needs-in-controllers.js
+++ b/lib/rules/avoid-using-needs-in-controllers.js
@@ -38,7 +38,11 @@ module.exports = {
         const properties = ember.getModuleProperties(node);
 
         properties.forEach((property) => {
-          if (property.key.name === 'needs') {
+          if (
+            property.type === 'Property' &&
+            property.key.type === 'Identifier' &&
+            property.key.name === 'needs'
+          ) {
             report(property);
           }
         });


Test patch:
diff --git a/tests/lib/rules/avoid-using-needs-in-controllers.js b/tests/lib/rules/avoid-using-needs-in-controllers.js
index 0192dcd7..b212eeab 100644
--- a/tests/lib/rules/avoid-using-needs-in-controllers.js
+++ b/tests/lib/rules/avoid-using-needs-in-controllers.js
@@ -10,6 +10,7 @@ const RuleTester = require('eslint').RuleTester;
 // ------------------------------------------------------------------------------
 
 const eslintTester = new RuleTester({
+  parser: require.resolve('babel-eslint'),
   parserOptions: {
     ecmaVersion: 6,
     sourceType: 'module',
@@ -18,6 +19,7 @@ const eslintTester = new RuleTester({
 eslintTester.run('avoid-using-needs-in-controllers', rule, {
   valid: [
     'export default Controller.extend();',
+    'export default Controller.extend({ ...foo });',
     'export default Controller.extend({ random: [] });',
     'export default FooController.extend();',
     'Controller.reopen();',
Repository: ember-cli/eslint-plugin-ember
Pull request #931 (2020-09-07 17:39:05)

Fix spread syntax crash in `no-unnecessary-route-path-option` rule


Patch:
diff --git a/lib/rules/no-unnecessary-route-path-option.js b/lib/rules/no-unnecessary-route-path-option.js
index 2f83793b..9245a29a 100644
--- a/lib/rules/no-unnecessary-route-path-option.js
+++ b/lib/rules/no-unnecessary-route-path-option.js
@@ -69,7 +69,12 @@ function hasPropertyWithKeyName(objectExpression, keyName) {
 }
 
 function getPropertyByKeyName(objectExpression, keyName) {
-  return objectExpression.properties.find((property) => property.key.name === keyName);
+  return objectExpression.properties.find(
+    (property) =>
+      types.isProperty(property) &&
+      types.isIdentifier(property.key) &&
+      property.key.name === keyName
+  );
 }
 
 function pathMatchesRouteName(path, routeName) {


Test patch:
diff --git a/tests/lib/rules/no-unnecessary-route-path-option.js b/tests/lib/rules/no-unnecessary-route-path-option.js
index f46e9ee1..204af738 100644
--- a/tests/lib/rules/no-unnecessary-route-path-option.js
+++ b/tests/lib/rules/no-unnecessary-route-path-option.js
@@ -11,11 +11,12 @@ const { ERROR_MESSAGE } = rule;
 // Tests
 //------------------------------------------------------------------------------
 
-const ruleTester = new RuleTester();
+const ruleTester = new RuleTester({ parser: require.resolve('babel-eslint') });
 ruleTester.run('no-unnecessary-route-path-option', rule, {
   valid: [
     'this.route("blog");',
     'this.route("blog", function() {});',
+    'this.route("blog", { ...foo });',
     'this.route("blog", { path: undefined });',
     'this.route("blog", { path: "" });',
     'this.route("blog", { path: "/" });',
Repository: ember-cli/eslint-plugin-ember
Pull request #932 (2020-09-07 17:42:31)

Fix spread syntax crash in `route-path-style` rule


Patch:
diff --git a/lib/rules/route-path-style.js b/lib/rules/route-path-style.js
index 656613dc..ca4450a7 100644
--- a/lib/rules/route-path-style.js
+++ b/lib/rules/route-path-style.js
@@ -64,7 +64,12 @@ function hasPropertyWithKeyName(objectExpression, keyName) {
 }
 
 function getPropertyByKeyName(objectExpression, keyName) {
-  return objectExpression.properties.find((property) => property.key.name === keyName);
+  return objectExpression.properties.find(
+    (property) =>
+      types.isProperty(property) &&
+      types.isIdentifier(property.key) &&
+      property.key.name === keyName
+  );
 }
 
 function getStaticURLSegments(path) {


Test patch:
diff --git a/tests/lib/rules/route-path-style.js b/tests/lib/rules/route-path-style.js
index 854b92ce..8ee8eea2 100644
--- a/tests/lib/rules/route-path-style.js
+++ b/tests/lib/rules/route-path-style.js
@@ -16,6 +16,7 @@ const ruleTester = new RuleTester({
     ecmaVersion: 6,
     sourceType: 'module',
   },
+  parser: require.resolve('babel-eslint'),
 });
 ruleTester.run('route-path-style', rule, {
   valid: [
@@ -61,6 +62,7 @@ ruleTester.run('route-path-style', rule, {
     'this.route("blog", { otherField: "/blog_posts" });',
     'this.route("blog", { otherField: "/blog_posts", path: "/blog" });',
     'this.route("blog-posts", { otherField: "/blog_posts" });',
+    'this.route("blog-posts", { ...foo });',
 
     // Not Ember's route function:
     'test();',
Repository: ember-cli/eslint-plugin-ember
Pull request #933 (2020-09-07 17:44:34)

Fix spread syntax crash in `routes-segments-snake-case` rule


Patch:
diff --git a/lib/rules/routes-segments-snake-case.js b/lib/rules/routes-segments-snake-case.js
index f7d349f5..80923c05 100644
--- a/lib/rules/routes-segments-snake-case.js
+++ b/lib/rules/routes-segments-snake-case.js
@@ -31,7 +31,12 @@ module.exports = {
     };
 
     const isSegment = function (property) {
-      return property.key.name === 'path' && routeSegmentRegex.test(property.value.value);
+      return (
+        types.isProperty(property) &&
+        types.isIdentifier(property.key) &&
+        property.key.name === 'path' &&
+        routeSegmentRegex.test(property.value.value)
+      );
     };
 
     const getSegmentNames = function (property) {


Test patch:
diff --git a/tests/lib/rules/routes-segments-snake-case.js b/tests/lib/rules/routes-segments-snake-case.js
index 2f21dd44..321b796f 100644
--- a/tests/lib/rules/routes-segments-snake-case.js
+++ b/tests/lib/rules/routes-segments-snake-case.js
@@ -9,7 +9,7 @@ const RuleTester = require('eslint').RuleTester;
 // Tests
 // ------------------------------------------------------------------------------
 
-const eslintTester = new RuleTester();
+const eslintTester = new RuleTester({ parser: require.resolve('babel-eslint') });
 eslintTester.run('routes-segments-snake-case', rule, {
   valid: [
     'this.route("tree", { path: ":tree_id"});',
@@ -26,6 +26,7 @@ eslintTester.run('routes-segments-snake-case', rule, {
     'this.route("tree", { path: "/test/:tree_id/test-test/:tree_child_id"});',
     'this.route("tree", { path: "/test/:tree_id/testTest/:tree_child_id"});',
     'this.route("tree", { path: "*:"});',
+    'this.route("tree", { ...foo });',
   ],
   invalid: [
     {
Repository: ember-cli/eslint-plugin-ember
Pull request #962 (2020-09-27 22:13:13)

Do not pass `...arguments` in autofix for attrs hooks in `require-super-in-init` rule
attrs hooks (didReceiveAttrs, didUpdateAttrs) should call super without ...arguments to satisfy the [ember/no-attrs-snapshot](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-attrs-snapshot.md) rule.

Note that this autofix only applies when the `checkInitOnly` option of the [ember/require-super-in-init](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/require-super-in-init.md) option is disabled.




Patch:
diff --git a/lib/rules/require-super-in-init.js b/lib/rules/require-super-in-init.js
index ff83dd63..4e600c73 100644
--- a/lib/rules/require-super-in-init.js
+++ b/lib/rules/require-super-in-init.js
@@ -93,9 +93,14 @@ module.exports = {
         node,
         message: ERROR_MESSAGE,
         fix(fixer) {
+          // attrs hooks should call super without ...arguments to satisfy ember/no-attrs-snapshot rule.
+          const replacementArgs = ['didReceiveAttrs', 'didUpdateAttrs'].includes(lifecycleHookName)
+            ? ''
+            : '...arguments';
+
           const replacement = isNativeClass
-            ? `super.${lifecycleHookName}(...arguments);`
-            : 'this._super(...arguments);';
+            ? `super.${lifecycleHookName}(${replacementArgs});`
+            : `this._super(${replacementArgs});`;
           // Insert right after function curly brace.
           const sourceCode = context.getSourceCode();
           const startOfBlockStatement = sourceCode.getFirstToken(node.value.body);


Test patch:
diff --git a/tests/lib/rules/require-super-in-init.js b/tests/lib/rules/require-super-in-init.js
index 8c6d0a63..339fa077 100644
--- a/tests/lib/rules/require-super-in-init.js
+++ b/tests/lib/rules/require-super-in-init.js
@@ -769,6 +769,24 @@ this._super(...arguments);
       errors: [{ message, line: 2 }],
     },
 
+    // attrs hooks should call super without ...arguments to satisfy ember/no-attrs-snapshot rule.
+    {
+      code: 'Component({ didReceiveAttrs() {} })',
+      output: `Component({ didReceiveAttrs() {
+this._super();} })`,
+      options: [{ checkInitOnly: false }],
+      errors: [{ message, line: 1 }],
+    },
+    {
+      code: `import Component from '@ember/component';
+      class Foo extends Component { didUpdateAttrs() {} }`,
+      output: `import Component from '@ember/component';
+      class Foo extends Component { didUpdateAttrs() {
+super.didUpdateAttrs();} }`,
+      options: [{ checkNativeClasses: true, checkInitOnly: false }],
+      errors: [{ message, line: 2 }],
+    },
+
     // Native classes:
     {
       code: `import Service from '@ember/service';