From 2a7d579b0dd3954ea96f023d7e21593942d608a2 Mon Sep 17 00:00:00 2001 From: James Couball Date: Tue, 15 Apr 2025 16:15:02 -0700 Subject: [PATCH] docs: remove Code Climate integration refactor: Make UncoveredLine struct definition private --- .github/workflows/continuous_integration.yml | 24 ---------------- README.md | 10 +++---- lib/simplecov-rspec.rb | 30 ++++++++++---------- 3 files changed, 19 insertions(+), 45 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index c56f361..b4e91c0 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -48,27 +48,3 @@ jobs: - name: Run rake run: bundle exec rake - - coverage: - name: Report test coverage to CodeClimate - - needs: [build] - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Initialize Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1 - bundler-cache: true - - - name: Report test coverage - uses: paambaati/codeclimate-action@v9 - env: - CC_TEST_REPORTER_ID: ddf1b66251c781daaf3d2b44371e7040ce4a60126bc0c270855f8bee2c58d6d1 - with: - coverageCommand: bundle exec rake spec - coverageLocations: ${{github.workspace}}/coverage/lcov/*.lcov:lcov diff --git a/README.md b/README.md index cd2dbbf..c45ca8d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ [![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/simplecov-rspec/) [![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/simplecov-rspec/file/CHANGELOG.md) [![Build Status](https://github.com/main-branch/simplecov-rspec/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/main-branch/simplecov-rspec/actions/workflows/continuous_integration.yml) -[![Maintainability](https://api.codeclimate.com/v1/badges/9a58b51d18910db724c7/maintainability)](https://codeclimate.com/github/main-branch/simplecov-rspec/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/9a58b51d18910db724c7/test_coverage)](https://codeclimate.com/github/main-branch/simplecov-rspec/test_coverage) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) [![Slack](https://img.shields.io/badge/slack-main--branch/simplecov--rspec-yellow.svg?logo=slack)](https://main-branch.slack.com/archives/C07MCM9J72B) @@ -34,12 +32,12 @@ If configured to list the lines that were not covered by tests, RSpec will addit * [Installation](#installation) * [Getting started](#getting-started) - * [Basic setup](#basic-setup) - * [Configuration from environment variables](#configuration-from-environment-variables) + * [Basic setup](#basic-setup) + * [Configuration from environment variables](#configuration-from-environment-variables) * [Development](#development) * [Contributing](#contributing) - * [Commit message guidelines](#commit-message-guidelines) - * [Pull request guidelines](#pull-request-guidelines) + * [Commit message guidelines](#commit-message-guidelines) + * [Pull request guidelines](#pull-request-guidelines) * [License](#license) * [Code of conduct](#code-of-conduct) diff --git a/lib/simplecov-rspec.rb b/lib/simplecov-rspec.rb index a0645c3..5b2c00f 100644 --- a/lib/simplecov-rspec.rb +++ b/lib/simplecov-rspec.rb @@ -231,6 +231,21 @@ def list_uncovered_lines? # def rspec_dry_run? = @rspec_dry_run + # An uncovered line + # + # @!attribute project_filename [rw] + # The path to the file with uncovered lines relative to the project root + # @return [String] + # @api private + # + # @!attribute line_number [rw] + # The line number of the uncovered line + # @return [Integer] + # @api private + # + # @api private + UncoveredLine = Struct.new(:project_filename, :line_number) + private # rubocop:disable Metrics/ParameterLists @@ -323,21 +338,6 @@ def uncovered_lines_found? = simplecov_module.result.files.any? { |source_file| # @private def show_uncovered_lines_report? = list_uncovered_lines? && uncovered_lines_found? - # An uncovered line - # - # @!attribute project_filename [rw] - # The path to the file with uncovered lines relative to the project root - # @return [String] - # @api private - # - # @!attribute line_number [rw] - # The line number of the uncovered line - # @return [Integer] - # @api private - # - # @api private - UncoveredLine = Struct.new(:project_filename, :line_number) - # Return the uncovered lines from the SimpleCov result # @return [Array] # @api private