Skip to content

Add project factory callout to Danger review

Brian Williams requested to merge bwill/add-let-project-callout into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds automated code review comments to Danger which call out usages of let or let! in specs, when combined with the :project factory, as these slow down specs significantly. See #373184 (closed) for further background.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

git fetch origin
git checkout -b 'bwill/add-let-project-callout' 'origin/bwill/add-let-project-callout'
git checkout -b "$(whoami)/test-project-callout"
cat <<EOF > spec/new_spec.rb
# frozen_string_literal: true

RSpec.describe 'this is a test' do
  let!(:project) { create(:project) }

  it 'is very slow' do
    expect(project).to be_present
  end
end
EOF
git commit -m 'test project callout' .
git push -u -o 'merge_request.create' "$(whoami)/test-project-callout"

Test MR: !98477 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams

Merge request reports

Loading