chore: enable freeze string literals by comment

This commit is contained in:
Colin Darie 2024-04-29 00:17:15 +02:00
parent edeb9a46ec
commit 77fb0553fc
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2262 changed files with 4520 additions and 1 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AdminController < ApplicationController
before_action :authenticate_administrateur!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Administrateurs::ActivateController < ApplicationController
include TrustedDeviceConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class AdministrateurController < ApplicationController
before_action :authenticate_administrateur!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class APITokensController < AdministrateurController
include ActionView::RecordIdentifier

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ArchivesController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class AttestationTemplateV2sController < AdministrateurController
include UninterlacePngConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class AttestationTemplatesController < AdministrateurController
include UninterlacePngConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ChorusController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ConditionsController < AdministrateurController
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class DossierSubmittedMessagesController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ExpertsProceduresController < AdministrateurController
include EmailSanitizableConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ExportsController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class GroupeGestionnaireController < AdministrateurController
before_action :retrieve_groupe_gestionnaire, only: [:show, :administrateurs, :gestionnaires, :commentaires, :create_commentaire]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class GroupeInstructeursController < AdministrateurController
include ActiveSupport::NumberHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class IneligibiliteRulesController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class JetonParticulierController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class MailTemplatesController < AdministrateurController
include ActionView::Helpers::SanitizeHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ProcedureAdministrateursController < AdministrateurController
before_action :retrieve_procedure, except: [:new]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ProceduresController < AdministrateurController
layout 'all', only: [:all, :administrateurs]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class RoutingRulesController < AdministrateurController
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class ServicesController < AdministrateurController
skip_before_action :alert_for_missing_siret_service, only: :edit

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class SourcesParticulierController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class SVASVRController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Administrateurs
class TypesDeChampController < AdministrateurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# doc: https://github.com/france-connect/Documentation-AgentConnect
class AgentConnect::AgentController < ApplicationController
before_action :redirect_to_login_if_fc_aborted, only: [:callback]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::Public::V1::BaseController < ApplicationController
skip_forgery_protection

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::Public::V1::DossiersController < API::Public::V1::BaseController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::Public::V1::JSONDescriptionProceduresController < API::Public::V1::BaseController
skip_before_action :check_content_type_is_json
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::Public::V1::StatsController < API::Public::V1::BaseController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::V1::DossiersController < APIController
before_action :check_api_token
before_action :fetch_dossiers

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::V1::ProceduresController < APIController
before_action :check_api_token
before_action :fetch_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::V2::BaseController < ApplicationController
# This controller is used for API v2 through api endpoint (/api/v2/graphql)
# and through the web interface (/graphql). When used through the web interface,

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::V2::DossiersController < API::V2::BaseController
before_action :ensure_dossier_present
skip_before_action :authenticate_from_token

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class API::V2::GraphqlController < API::V2::BaseController
def execute
result = API::V2::Schema.execute(query:, variables:, context:, operation_name:)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class APIController < ApplicationController
before_action :default_format_json
before_action :authenticate_from_token

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class APIGeoTestController < ActionController::Base
def regions
render json: [{ nom: 'Martinique' }]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
include TrustedDeviceConcern
include Pundit::Authorization

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ApplicationController::ErrorHandling
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ApplicationController::LongLivedAuthenticityToken
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AttachmentsController < ApplicationController
before_action :authenticate_logged_user!
include ActiveStorage::SetBlob

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CarteController < ApplicationController
def show
@map_filter = MapFilter.new(params.fetch(:map_filter, {}).permit(:kind, :year))

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::CarteController < Champs::ChampController
def index
@focus = params[:focus].present?

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::ChampController < ApplicationController
before_action :authenticate_logged_user!
before_action :set_champ

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::PieceJustificativeController < Champs::ChampController
def show
respond_to do |format|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::RepetitionController < Champs::ChampController
def add
row = @champ.add_row(@champ.dossier.revision)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::RNAController < Champs::ChampController
def show
champs_attributes = params.dig(:dossier, :champs_public_attributes) || params.dig(:dossier, :champs_private_attributes)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Champs::SiretController < Champs::ChampController
def show
champs_attributes = params.dig(:dossier, :champs_public_attributes) || params.dig(:dossier, :champs_private_attributes)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module CreateAvisConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module DevisePopulatedResource
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module GroupeInstructeursSignatureConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module LockableConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ProcedureContextConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module TurboChampsConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module UninterlacePngConcern
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ContactController < ApplicationController
invisible_captcha only: [:create], on_spam: :redirect_to_root

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DataSources::AdresseController < ApplicationController
def search
if params[:q].present? && params[:q].length > 3

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DataSources::ChorusController < ApplicationController
before_action :authenticate_administrateur!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DataSources::CommuneController < ApplicationController
def search
if params[:q].present? && params[:q].length > 1

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DataSources::EducationController < ApplicationController
def search
if params[:q].present? && params[:q].length >= 3

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Devise
# Useful helpers additions to Devise::Controllers::StoreLocation
module StoreLocationExtension

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EmailCheckerController < ApplicationController
def show
render json: EmailChecker.check(email: params[:email])

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Experts
class AvisController < ExpertController
include CreateAvisConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Experts
class ExpertController < ApplicationController
before_action :authenticate_expert!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class FranceConnect::ParticulierController < ApplicationController
before_action :redirect_to_login_if_fc_aborted, only: [:callback]
before_action :securely_retrieve_fci, only: [:merge, :merge_with_existing_account, :merge_with_new_account, :resend_and_renew_merge_confirmation]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Gestionnaires::ActivateController < ApplicationController
include TrustedDeviceConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GestionnaireController < ApplicationController
before_action :authenticate_gestionnaire!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GroupeGestionnaireAdministrateursController < GestionnaireController
before_action :retrieve_groupe_gestionnaire

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GroupeGestionnaireChildrenController < GestionnaireController
before_action :retrieve_groupe_gestionnaire

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GroupeGestionnaireCommentairesController < GestionnaireController
before_action :retrieve_groupe_gestionnaire

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GroupeGestionnaireGestionnairesController < GestionnaireController
before_action :retrieve_groupe_gestionnaire

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Gestionnaires
class GroupeGestionnairesController < GestionnaireController
before_action :retrieve_groupe_gestionnaire, only: [:show, :edit, :update, :destroy, :tree_structure]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class GraphqlController < ApplicationController
def playground
procedure = current_administrateur&.procedures&.last

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class ArchivesController < InstructeurController
before_action :retrieve_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class AvisController < InstructeurController
include CreateAvisConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class BatchOperationsController < ApplicationController
before_action :set_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class CommentairesController < ApplicationController
before_action :authenticate_instructeur_or_expert!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class ContactInformationsController < InstructeurController
def new

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class DossiersController < ProceduresController
include ActionView::Helpers::NumberHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class ExportTemplatesController < InstructeurController
before_action :set_procedure_and_groupe_instructeurs

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class GroupeInstructeursController < InstructeurController
include EmailSanitizableConcern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class InstructeurController < ApplicationController
before_action :authenticate_instructeur!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Instructeurs
class ProceduresController < InstructeurController
before_action :ensure_ownership!, except: [:index]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class InvitesController < ApplicationController
before_action :authenticate_user!, only: [:create]
before_action :store_user_location!, only: [:show]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class AdministrateurConfirmationsController < Manager::ApplicationController
before_action :set_procedure

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class AdministrateursController < Manager::ApplicationController
def create

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ApplicationController < Administrate::ApplicationController
before_action :authenticate_super_admin!

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ArchivesController < Manager::ApplicationController
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class BillSignaturesController < Manager::ApplicationController
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ConfirmationUrlsController < Manager::ApplicationController
before_action :ensure_administrateur_exists

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class DossiersController < Manager::ApplicationController
#

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class DubiousProceduresController < Manager::ApplicationController
def index

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class EmailEventsController < Manager::ApplicationController
def index

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ExpertsController < Manager::ApplicationController
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ExportsController < Manager::ApplicationController
# Overwrite any of the RESTful controller actions to implement custom behavior

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class GestionnairesController < Manager::ApplicationController
def delete

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class GroupeGestionnairesController < Manager::ApplicationController
def add_gestionnaire

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class GroupeInstructeursController < Manager::ApplicationController
# Overwrite any of the RESTful controller actions to implement custom behavior

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class InstructeursController < Manager::ApplicationController
def reinvite

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class OutdatedProceduresController < Manager::ApplicationController
def index

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Manager
class ProceduresController < Manager::ApplicationController
CSV_MAX_SIZE = 1.megabytes

Some files were not shown because too many files have changed in this diff Show more