From 9e9b4ddf82ba0749e9bc71f28ad64be923c7650e Mon Sep 17 00:00:00 2001 From: Richard Gomez Date: Wed, 25 Dec 2024 15:00:31 -0500 Subject: [PATCH] chore: remove useless detector test --- pkg/detectors/aha/aha_test.go | 5 ----- .../airbrakeprojectkey/airbrakeprojectkey_test.go | 5 ----- pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go | 5 ----- pkg/detectors/airship/airship_test.go | 5 ----- pkg/detectors/airvisual/airvisual_test.go | 5 ----- pkg/detectors/aiven/aiven_test.go | 5 ----- pkg/detectors/alconost/alconost_test.go | 5 ----- pkg/detectors/alegra/alegra_test.go | 5 ----- pkg/detectors/aletheiaapi/aletheiaapi_test.go | 5 ----- pkg/detectors/algoliaadminkey/algoliaadminkey_test.go | 5 ----- pkg/detectors/alienvault/alienvault_test.go | 5 ----- pkg/detectors/allsports/allsports_test.go | 5 ----- pkg/detectors/amadeus/amadeus_test.go | 5 ----- pkg/detectors/ambee/ambee_test.go | 5 ----- pkg/detectors/checkvist/checkvist_test.go | 5 ----- .../cloudflareglobalapikey/cloudflareglobalapikey_test.go | 5 ----- pkg/detectors/cloze/cloze_test.go | 5 ----- pkg/detectors/currencycloud/currencycloud_test.go | 5 ----- pkg/detectors/gocanvas/gocanvas_test.go | 5 ----- pkg/detectors/ibmclouduserkey/ibmclouduserkey_test.go | 5 ----- pkg/detectors/iconfinder/iconfinder_test.go | 7 +------ pkg/detectors/iexapis/iexapis_test.go | 7 +------ pkg/detectors/iexcloud/iexcloud_test.go | 7 +------ pkg/detectors/imagekit/imagekit_test.go | 7 +------ pkg/detectors/imagga/imagga_test.go | 7 +------ pkg/detectors/impala/impala_test.go | 7 +------ pkg/detectors/infura/infura_test.go | 7 +------ pkg/detectors/insightly/insightly_test.go | 7 +------ pkg/detectors/instabot/instabot_test.go | 7 +------ pkg/detectors/instamojo/instamojo_test.go | 7 +------ pkg/detectors/intercom/intercom_test.go | 7 +------ pkg/detectors/interseller/interseller_test.go | 7 +------ pkg/detectors/intrinio/intrinio_test.go | 7 +------ pkg/detectors/invoiceocean/invoiceocean_test.go | 5 ----- pkg/detectors/ip2location/ip2location_test.go | 7 +------ pkg/detectors/ipapi/ipapi_test.go | 7 +------ pkg/detectors/ipgeolocation/ipgeolocation_test.go | 5 ----- pkg/detectors/ipinfo/ipinfo_test.go | 7 +------ pkg/detectors/ipinfodb/ipinfodb_test.go | 7 +------ pkg/detectors/ipquality/ipquality_test.go | 7 +------ pkg/detectors/ipstack/ipstack_test.go | 7 +------ pkg/detectors/jiratoken/v1/jiratoken_test.go | 5 ----- pkg/detectors/jiratoken/v2/jiratoken_v2_test.go | 5 ----- pkg/detectors/jotform/jotform_test.go | 7 +------ pkg/detectors/jumpcloud/jumpcloud_test.go | 7 +------ pkg/detectors/jupiterone/jupiterone_test.go | 7 +------ pkg/detectors/juro/juro_test.go | 7 +------ pkg/detectors/kanban/kanban_test.go | 7 +------ pkg/detectors/kanbantool/kanbantool_test.go | 7 +------ pkg/detectors/karmacrm/karmacrm_test.go | 7 +------ pkg/detectors/keenio/keenio_test.go | 7 +------ pkg/detectors/kickbox/kickbox_test.go | 7 +------ pkg/detectors/klipfolio/klipfolio_test.go | 7 +------ pkg/detectors/knapsackpro/knapsackpro_test.go | 7 +------ pkg/detectors/kontent/kontent_test.go | 7 +------ pkg/detectors/kraken/kraken_test.go | 7 +------ pkg/detectors/kucoin/kucoin_test.go | 7 +------ pkg/detectors/kylas/kylas_test.go | 7 +------ pkg/detectors/languagelayer/languagelayer_test.go | 5 ----- pkg/detectors/leadfeeder/leadfeeder_test.go | 7 +------ pkg/detectors/lemlist/lemlist_test.go | 7 +------ pkg/detectors/lemonsqueezy/lemonsqueezy_test.go | 5 ----- pkg/detectors/lendflow/lendflow_test.go | 7 +------ pkg/detectors/lessannoyingcrm/lessannoyingcrm_test.go | 5 ----- pkg/detectors/lexigram/lexigram_test.go | 7 +------ pkg/detectors/linemessaging/linemessaging_test.go | 5 ----- pkg/detectors/linenotify/linenotify_test.go | 7 +------ pkg/detectors/linkpreview/linkpreview_test.go | 7 +------ pkg/detectors/liveagent/liveagent_test.go | 7 +------ pkg/detectors/livestorm/livestorm_test.go | 7 +------ pkg/detectors/loadmill/loadmill_test.go | 7 +------ pkg/detectors/lob/lob_test.go | 7 +------ pkg/detectors/loggly/loggly_test.go | 7 +------ pkg/detectors/loginradius/loginradius_test.go | 7 +------ pkg/detectors/logzio/logzio_test.go | 7 +------ pkg/detectors/lokalisetoken/lokalisetoken_test.go | 5 ----- pkg/detectors/loyverse/loyverse_test.go | 7 +------ pkg/detectors/lunchmoney/lunchmoney_test.go | 7 +------ pkg/detectors/luno/luno_test.go | 7 +------ pkg/detectors/m3o/m3o_test.go | 7 +------ pkg/detectors/madkudu/madkudu_test.go | 7 +------ pkg/detectors/magicbell/magicbell_test.go | 5 ----- pkg/detectors/magnetic/magnetic_test.go | 7 +------ pkg/detectors/mailboxlayer/mailboxlayer_test.go | 5 ----- pkg/detectors/mailerlite/mailerlite_test.go | 7 +------ pkg/detectors/mailjetbasicauth/mailjetbasicauth_test.go | 5 ----- pkg/detectors/mailjetsms/mailjetsms_test.go | 7 +------ pkg/detectors/mailmodo/mailmodo_test.go | 7 +------ pkg/detectors/mailsac/mailsac_test.go | 7 +------ pkg/detectors/mandrill/mandrill_test.go | 7 +------ pkg/detectors/manifest/manifest_test.go | 7 +------ pkg/detectors/mapquest/mapquest_test.go | 7 +------ pkg/detectors/marketstack/marketstack_test.go | 7 +------ .../mattermostpersonaltoken_test.go | 5 ----- pkg/detectors/mavenlink/mavenlink_test.go | 7 +------ pkg/detectors/maxmindlicense/v1/maxmindlicense_test.go | 5 ----- pkg/detectors/meaningcloud/meaningcloud_test.go | 5 ----- pkg/detectors/mediastack/mediastack_test.go | 7 +------ pkg/detectors/meistertask/meistertask_test.go | 7 +------ pkg/detectors/mesibo/mesibo_test.go | 7 +------ pkg/detectors/messagebird/messagebird_test.go | 7 +------ pkg/detectors/metaapi/metaapi_test.go | 7 +------ pkg/detectors/metabase/metabase_test.go | 7 +------ pkg/detectors/metrilo/metrilo_test.go | 7 +------ pkg/detectors/mindmeister/mindmeister_test.go | 7 +------ pkg/detectors/miro/miro_test.go | 7 +------ pkg/detectors/mite/mite_test.go | 7 +------ pkg/detectors/mixmax/mixmax_test.go | 7 +------ pkg/detectors/mixpanel/mixpanel_test.go | 7 +------ pkg/detectors/mockaroo/mockaroo_test.go | 7 +------ pkg/detectors/moderation/moderation_test.go | 7 +------ pkg/detectors/monday/monday_test.go | 7 +------ pkg/detectors/monkeylearn/monkeylearn_test.go | 7 +------ pkg/detectors/moonclerk/moonclerk_test.go | 7 +------ pkg/detectors/moosend/moosend_test.go | 7 +------ pkg/detectors/moralis/moralis_test.go | 5 ----- pkg/detectors/mrticktock/mrticktock_test.go | 5 ----- pkg/detectors/mux/mux_test.go | 7 +------ pkg/detectors/myfreshworks/myfreshworks_test.go | 5 ----- pkg/detectors/myintervals/myintervals_test.go | 7 +------ pkg/detectors/nasdaqdatalink/nasdaqdatalink_test.go | 5 ----- pkg/detectors/netlify/netlify_test.go | 7 +------ .../newrelicpersonalapikey/newrelicpersonalapikey_test.go | 5 ----- pkg/detectors/newsapi/newsapi_test.go | 7 +------ pkg/detectors/newscatcher/newscatcher_test.go | 5 ----- pkg/detectors/nftport/nftport_test.go | 5 ----- pkg/detectors/ngrok/ngrok_test.go | 5 ----- pkg/detectors/nicereply/nicereply_test.go | 7 +------ pkg/detectors/nimble/nimble_test.go | 5 ----- pkg/detectors/noticeable/noticeable_test.go | 7 +------ pkg/detectors/nozbeteams/nozbeteams_test.go | 7 +------ pkg/detectors/npmtoken/npmtoken_test.go | 7 +------ pkg/detectors/nugetapikey/nugetapikey_test.go | 7 +------ pkg/detectors/numverify/numverify_test.go | 7 +------ pkg/detectors/nylas/nylas_test.go | 5 ----- pkg/detectors/oanda/oanda_test.go | 5 ----- pkg/detectors/omnisend/omnisend_test.go | 7 +------ pkg/detectors/oopspam/oopspam_test.go | 7 +------ pkg/detectors/opencagedata/opencagedata_test.go | 5 ----- pkg/detectors/openuv/openuv_test.go | 7 +------ pkg/detectors/openweather/openweather_test.go | 7 +------ pkg/detectors/opsgenie/opsgenie_test.go | 7 +------ pkg/detectors/optimizely/optimizely_test.go | 5 ----- pkg/detectors/overloop/overloop_test.go | 7 +------ pkg/detectors/owlbot/owlbot_test.go | 7 +------ pkg/detectors/packagecloud/packagecloud_test.go | 5 ----- pkg/detectors/pagerdutyapikey/pagerdutyapikey_test.go | 5 ----- pkg/detectors/pandadoc/pandadoc_test.go | 5 ----- pkg/detectors/pandascore/pandascore_test.go | 7 +------ pkg/detectors/paperform/paperform_test.go | 5 ----- pkg/detectors/paralleldots/paralleldots_test.go | 5 ----- pkg/detectors/parsehub/parsehub_test.go | 7 +------ pkg/detectors/parsers/parsers_test.go | 5 ----- pkg/detectors/partnerstack/partnerstack_test.go | 5 ----- pkg/detectors/pastebin/pastebin_test.go | 5 ----- pkg/detectors/paydirtapp/paydirtapp_test.go | 7 +------ pkg/detectors/paymoapp/paymoapp_test.go | 7 +------ pkg/detectors/paymongo/paymongo_test.go | 7 +------ pkg/detectors/pdflayer/pdflayer_test.go | 7 +------ pkg/detectors/pdfshift/pdfshift_test.go | 5 ----- pkg/detectors/peopledatalabs/peopledatalabs_test.go | 5 ----- pkg/detectors/pepipost/pepipost_test.go | 7 +------ pkg/detectors/percy/percy_test.go | 7 +------ pkg/detectors/pipedream/pipedream_test.go | 7 +------ pkg/detectors/pipedrive/pipedrive_test.go | 7 +------ pkg/detectors/pivotaltracker/pivotaltracker_test.go | 5 ----- pkg/detectors/pixabay/pixabay_test.go | 5 ----- pkg/detectors/planyo/planyo_test.go | 5 ----- pkg/detectors/podio/podio_test.go | 7 +------ pkg/detectors/pollsapi/pollsapi_test.go | 5 ----- pkg/detectors/polygon/polygon_test.go | 7 +------ pkg/detectors/positionstack/positionstack_test.go | 5 ----- pkg/detectors/postageapp/postageapp_test.go | 7 +------ pkg/detectors/postbacks/postbacks_test.go | 7 +------ pkg/detectors/postmark/postmark_test.go | 7 +------ pkg/detectors/powrbot/powrbot_test.go | 7 +------ pkg/detectors/privacy/privacy_test.go | 7 +------ pkg/detectors/prodpad/prodpad_test.go | 7 +------ pkg/detectors/prospectcrm/prospectcrm_test.go | 5 ----- pkg/detectors/protocolsio/protocolsio_test.go | 5 ----- pkg/detectors/proxycrawl/proxycrawl_test.go | 5 ----- pkg/detectors/purestake/purestake_test.go | 5 ----- pkg/detectors/pushbulletapikey/pushbulletapikey_test.go | 5 ----- pkg/detectors/qase/qase_test.go | 5 ----- pkg/detectors/qualaroo/qualaroo_test.go | 7 +------ pkg/detectors/qubole/qubole_test.go | 7 +------ pkg/detectors/rapidapi/rapidapi_test.go | 7 +------ pkg/detectors/raven/raven_test.go | 7 +------ pkg/detectors/rawg/rawg_test.go | 7 +------ pkg/detectors/reachmail/reachmail_test.go | 7 +------ pkg/detectors/rebrandly/rebrandly_test.go | 5 ----- pkg/detectors/refiner/refiner_test.go | 7 +------ pkg/detectors/rentman/rentman_test.go | 7 +------ pkg/detectors/replyio/replyio_test.go | 5 ----- pkg/detectors/requestfinance/requestfinance_test.go | 5 ----- pkg/detectors/restpack/restpack_test.go | 7 +------ .../restpackhtmltopdfapi/restpackhtmltopdfapi_test.go | 5 ----- .../restpackscreenshotapi/restpackscreenshotapi_test.go | 5 ----- pkg/detectors/ritekit/ritekit_test.go | 7 +------ pkg/detectors/rocketreach/rocketreach_test.go | 7 +------ pkg/detectors/rockset/rockset_test.go | 7 +------ pkg/detectors/route4me/route4me_test.go | 7 +------ pkg/detectors/salesblink/salesblink_test.go | 7 +------ pkg/detectors/salescookie/salescookie_test.go | 5 ----- pkg/detectors/salesflare/salesflare_test.go | 7 +------ pkg/detectors/scalewaykey/scalewaykey_test.go | 7 +------ pkg/detectors/scrapeowl/scrapeowl_test.go | 7 +------ pkg/detectors/scraperapi/scraperapi_test.go | 7 +------ pkg/detectors/scraperbox/scraperbox_test.go | 7 +------ pkg/detectors/scrapestack/scrapestack_test.go | 7 +------ pkg/detectors/scrapfly/scrapfly_test.go | 7 +------ pkg/detectors/scrapingant/scrapingant_test.go | 5 ----- pkg/detectors/scrapingbee/scrapingbee_test.go | 5 ----- pkg/detectors/screenshotapi/screenshotapi_test.go | 5 ----- pkg/detectors/screenshotlayer/screenshotlayer_test.go | 5 ----- pkg/detectors/scrutinizerci/scrutinizerci_test.go | 5 ----- pkg/detectors/securitytrails/securitytrails_test.go | 5 ----- pkg/detectors/segmentapikey/segmentapikey_test.go | 5 ----- pkg/detectors/selectpdf/selectpdf_test.go | 7 +------ pkg/detectors/semaphore/semaphore_test.go | 7 +------ .../sendbirdorganizationapi_test.go | 5 ----- pkg/detectors/sentrytoken/sentrytoken_test.go | 7 +------ pkg/detectors/serphouse/serphouse_test.go | 7 +------ pkg/detectors/serpstack/serpstack_test.go | 7 +------ pkg/detectors/sherpadesk/sherpadesk_test.go | 7 +------ pkg/detectors/shipday/shipday_test.go | 7 +------ pkg/detectors/shodankey/shodankey_test.go | 7 +------ pkg/detectors/shortcut/shortcut_test.go | 7 +------ pkg/detectors/shotstack/shotstack_test.go | 7 +------ pkg/detectors/shutterstockoauth/shutterstockoauth_test.go | 5 ----- pkg/detectors/signaturit/signaturit_test.go | 7 +------ pkg/detectors/signupgenius/signupgenius_test.go | 5 ----- pkg/detectors/sigopt/sigopt_test.go | 7 +------ pkg/detectors/simfin/simfin_test.go | 7 +------ pkg/detectors/simplesat/simplesat_test.go | 7 +------ pkg/detectors/simplynoted/simplynoted_test.go | 5 ----- pkg/detectors/simvoly/simvoly_test.go | 7 +------ pkg/detectors/skrappio/skrappio_test.go | 5 ----- pkg/detectors/smartsheets/smartsheets_test.go | 7 +------ pkg/detectors/snipcart/snipcart_test.go | 5 ----- pkg/detectors/sonarcloud/sonarcloud_test.go | 5 ----- pkg/detectors/speechtextai/speechtextai_test.go | 5 ----- .../splunkobservabilitytoken_test.go | 5 ----- pkg/detectors/spoonacular/spoonacular_test.go | 5 ----- pkg/detectors/sportsmonk/sportsmonk_test.go | 7 +------ pkg/detectors/square/square_test.go | 7 +------ pkg/detectors/squarespace/squarespace_test.go | 7 +------ pkg/detectors/sslmate/sslmate_test.go | 5 ----- pkg/detectors/statuscake/statuscake_test.go | 7 +------ pkg/detectors/statuspage/statuspage_test.go | 7 +------ pkg/detectors/statuspal/statuspal_test.go | 7 +------ pkg/detectors/stitchdata/stitchdata_test.go | 7 +------ pkg/detectors/stockdata/stockdata_test.go | 5 ----- pkg/detectors/storecove/storecove_test.go | 5 ----- pkg/detectors/stormboard/stormboard_test.go | 5 ----- pkg/detectors/stormglass/stormglass_test.go | 7 +------ pkg/detectors/storyblok/storyblok_test.go | 5 ----- pkg/detectors/storychief/storychief_test.go | 7 +------ pkg/detectors/streak/streak_test.go | 5 ----- pkg/detectors/stripo/stripo_test.go | 7 +------ pkg/detectors/supernotesapi/supernotesapi_test.go | 5 ----- pkg/detectors/surveybot/surveybot_test.go | 7 +------ pkg/detectors/surveysparrow/surveysparrow_test.go | 5 ----- pkg/detectors/survicate/survicate_test.go | 5 ----- pkg/detectors/swiftype/swiftype_test.go | 5 ----- pkg/detectors/tallyfy/tallyfy_test.go | 7 +------ pkg/detectors/tatumio/tatumio_test.go | 5 ----- pkg/detectors/taxjar/taxjar_test.go | 7 +------ pkg/detectors/teamworkcrm/teamworkcrm_test.go | 5 ----- pkg/detectors/teamworkdesk/teamworkdesk_test.go | 5 ----- pkg/detectors/teamworkspaces/teamworkspaces_test.go | 5 ----- .../technicalanalysisapi/technicalanalysisapi_test.go | 5 ----- pkg/detectors/tefter/tefter_test.go | 7 +------ pkg/detectors/telegrambottoken/telegrambottoken_test.go | 5 ----- pkg/detectors/teletype/teletype_test.go | 7 +------ pkg/detectors/telnyx/telnyx_test.go | 7 +------ pkg/detectors/theoddsapi/theoddsapi_test.go | 7 +------ pkg/detectors/ticketmaster/ticketmaster_test.go | 5 ----- pkg/detectors/tickettailor/tickettailor_test.go | 5 ----- pkg/detectors/tiingo/tiingo_test.go | 5 ----- pkg/detectors/timecamp/timecamp_test.go | 7 +------ pkg/detectors/timezoneapi/timezoneapi_test.go | 5 ----- pkg/detectors/tly/tly_test.go | 5 ----- pkg/detectors/tmetric/tmetric_test.go | 7 +------ pkg/detectors/todoist/todoist_test.go | 5 ----- pkg/detectors/toggltrack/toggltrack_test.go | 5 ----- pkg/detectors/tomorrowio/tomorrowio_test.go | 5 ----- pkg/detectors/tomtom/tomtom_test.go | 5 ----- pkg/detectors/tradier/tradier_test.go | 7 +------ pkg/detectors/transferwise/transferwise_test.go | 5 ----- pkg/detectors/travelpayouts/travelpayouts_test.go | 5 ----- pkg/detectors/travisci/travisci_test.go | 7 +------ pkg/detectors/twelvedata/twelvedata_test.go | 7 +------ pkg/detectors/twist/twist_test.go | 7 +------ pkg/detectors/twitter/v1/twitter_v1_test.go | 5 ----- pkg/detectors/twitter/v2/twitter_v2_test.go | 5 ----- pkg/detectors/tyntec/tyntec_test.go | 5 ----- pkg/detectors/typeform/v1/typeform_test.go | 5 ----- pkg/detectors/uclassify/uclassify_test.go | 5 ----- pkg/detectors/unifyid/unifyid_test.go | 7 +------ pkg/detectors/unplugg/unplugg_test.go | 7 +------ pkg/detectors/unsplash/unsplash_test.go | 5 ----- pkg/detectors/upcdatabase/upcdatabase_test.go | 5 ----- pkg/detectors/uplead/uplead_test.go | 7 +------ pkg/detectors/uptimerobot/uptimerobot_test.go | 5 ----- pkg/detectors/upwave/upwave_test.go | 7 +------ pkg/detectors/urlscan/urlscan_test.go | 7 +------ pkg/detectors/user/user_test.go | 7 +------ pkg/detectors/userflow/userflow_test.go | 7 +------ pkg/detectors/userstack/userstack_test.go | 7 +------ .../vagrantcloudpersonaltoken_test.go | 5 ----- pkg/detectors/vatlayer/vatlayer_test.go | 5 ----- pkg/detectors/vbout/vbout_test.go | 5 ----- pkg/detectors/vercel/vercel_test.go | 7 +------ pkg/detectors/verimail/verimail_test.go | 5 ----- pkg/detectors/veriphone/veriphone_test.go | 7 +------ pkg/detectors/versioneye/versioneye_test.go | 7 +------ pkg/detectors/viewneo/viewneo_test.go | 7 +------ pkg/detectors/virustotal/virustotal_test.go | 7 +------ pkg/detectors/visualcrossing/visualcrossing_test.go | 5 ----- pkg/detectors/voicegain/voicegain_test.go | 5 ----- pkg/detectors/voodoosms/voodoosms_test.go | 7 +------ pkg/detectors/vpnapi/vpnapi_test.go | 7 +------ pkg/detectors/vultrapikey/vultrapikey_test.go | 5 ----- pkg/detectors/vyte/vyte_test.go | 7 +------ pkg/detectors/walkscore/walkscore_test.go | 5 ----- pkg/detectors/weatherbit/weatherbit_test.go | 5 ----- pkg/detectors/weatherstack/weatherstack_test.go | 5 ----- pkg/detectors/web3storage/web3storage_test.go | 5 ----- pkg/detectors/webflow/webflow_test.go | 7 +------ pkg/detectors/webscraper/webscraper_test.go | 5 ----- pkg/detectors/webscraping/webscraping_test.go | 5 ----- pkg/detectors/whoxy/whoxy_test.go | 5 ----- pkg/detectors/wistia/wistia_test.go | 7 +------ pkg/detectors/wit/wit_test.go | 7 +------ pkg/detectors/worksnaps/worksnaps_test.go | 7 +------ pkg/detectors/workstack/workstack_test.go | 5 ----- pkg/detectors/worldcoinindex/worldcoinindex_test.go | 5 ----- pkg/detectors/worldweather/worldweather_test.go | 5 ----- pkg/detectors/wrike/wrike_test.go | 5 ----- pkg/detectors/yandex/yandex_test.go | 5 ----- pkg/detectors/yelp/yelp_test.go | 5 ----- pkg/detectors/youneedabudget/youneedabudget_test.go | 5 ----- pkg/detectors/yousign/yousign_test.go | 5 ----- pkg/detectors/zenkitapi/zenkitapi_test.go | 7 +------ pkg/detectors/zenrows/zenrows_test.go | 7 +------ pkg/detectors/zenscrape/zenscrape_test.go | 5 ----- pkg/detectors/zenserp/zenserp_test.go | 5 ----- pkg/detectors/zeplin/zeplin_test.go | 5 ----- pkg/detectors/zerobounce/zerobounce_test.go | 5 ----- pkg/detectors/zerotier/zerotier_test.go | 5 ----- pkg/detectors/zipcodeapi/zipcodeapi_test.go | 5 ----- pkg/detectors/zipcodebase/zipcodebase_test.go | 5 ----- pkg/detectors/zonkafeedback/zonkafeedback_test.go | 5 ----- 354 files changed, 197 insertions(+), 1967 deletions(-) diff --git a/pkg/detectors/aha/aha_test.go b/pkg/detectors/aha/aha_test.go index d68de04b7827..2f40de866636 100644 --- a/pkg/detectors/aha/aha_test.go +++ b/pkg/detectors/aha/aha_test.go @@ -39,11 +39,6 @@ func TestAha_Pattern(t *testing.T) { input: fmt.Sprintf("aha.io = '%s\n URL is not close to the keyword but should be detected %s'", key, url), want: []string{key}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("aha.io keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "valid pattern - only key", input: fmt.Sprintf("aha.io %s", key), diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go index 7c70bb9c3a73..72476a946768 100644 --- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go +++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go @@ -31,11 +31,6 @@ func TestAirBrakeProjectKey_Pattern(t *testing.T) { input: fmt.Sprintf("airbrake = '%s'", validPattern), want: []string{"qwmnerBv56zxpocvkjqr78afvYUx90Op451298"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("airbrake keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "valid pattern - only key", input: fmt.Sprintf("airbrake %s", strings.Split(validPattern, "/")[0]), diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go index b41696885952..269cba39bb5a 100644 --- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go +++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go @@ -30,11 +30,6 @@ func TestAirBrakeUserKey_Pattern(t *testing.T) { input: fmt.Sprintf("airbrake = '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("airbrake keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("airbrake = '%s'", invalidPattern), diff --git a/pkg/detectors/airship/airship_test.go b/pkg/detectors/airship/airship_test.go index dc354533be42..7948cf2adaec 100644 --- a/pkg/detectors/airship/airship_test.go +++ b/pkg/detectors/airship/airship_test.go @@ -30,11 +30,6 @@ func TestAirship_Pattern(t *testing.T) { input: fmt.Sprintf("airship = '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("airship keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("airship = '%s'", invalidPattern), diff --git a/pkg/detectors/airvisual/airvisual_test.go b/pkg/detectors/airvisual/airvisual_test.go index b4d5853844a7..de41f1d63333 100644 --- a/pkg/detectors/airvisual/airvisual_test.go +++ b/pkg/detectors/airvisual/airvisual_test.go @@ -30,11 +30,6 @@ func TestAirVisual_Pattern(t *testing.T) { input: fmt.Sprintf("airvisual = '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("airvisual keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("airvisual key: '%s'", invalidPattern), diff --git a/pkg/detectors/aiven/aiven_test.go b/pkg/detectors/aiven/aiven_test.go index f6447a02fbf7..c872cd061a85 100644 --- a/pkg/detectors/aiven/aiven_test.go +++ b/pkg/detectors/aiven/aiven_test.go @@ -30,11 +30,6 @@ func TestAiven_Pattern(t *testing.T) { input: fmt.Sprintf("aiven = '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("aiven keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("aiven = '%s'", invalidPattern), diff --git a/pkg/detectors/alconost/alconost_test.go b/pkg/detectors/alconost/alconost_test.go index 0c4cc1f0e827..0672f6e6f9c7 100644 --- a/pkg/detectors/alconost/alconost_test.go +++ b/pkg/detectors/alconost/alconost_test.go @@ -30,11 +30,6 @@ func TestAlconost_Pattern(t *testing.T) { input: fmt.Sprintf("alconost: '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("alconost keyword is not close to the real key in the data = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("alconost: '%s'", invalidPattern), diff --git a/pkg/detectors/alegra/alegra_test.go b/pkg/detectors/alegra/alegra_test.go index 5594c9ba4c1f..b950d0017e58 100644 --- a/pkg/detectors/alegra/alegra_test.go +++ b/pkg/detectors/alegra/alegra_test.go @@ -36,11 +36,6 @@ func TestAlegra_Pattern(t *testing.T) { input: fmt.Sprintf("alegra: %s", validSpecialCharPattern), want: []string{"wdvn-usa87a-fxp9ioas:test-User.1005@example.com"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("alegra keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("alegra: %s", invalidPattern), diff --git a/pkg/detectors/aletheiaapi/aletheiaapi_test.go b/pkg/detectors/aletheiaapi/aletheiaapi_test.go index e651d037f5f5..c2771dcbde0a 100644 --- a/pkg/detectors/aletheiaapi/aletheiaapi_test.go +++ b/pkg/detectors/aletheiaapi/aletheiaapi_test.go @@ -30,11 +30,6 @@ func TestAleTheIaAPI_Pattern(t *testing.T) { input: fmt.Sprintf("aletheiaapi: '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("aletheiaapi keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("aletheiaapi: '%s'", invalidPattern), diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey_test.go b/pkg/detectors/algoliaadminkey/algoliaadminkey_test.go index 5cdf314c058b..862f777f6255 100644 --- a/pkg/detectors/algoliaadminkey/algoliaadminkey_test.go +++ b/pkg/detectors/algoliaadminkey/algoliaadminkey_test.go @@ -30,11 +30,6 @@ func TestAlgoliaAdminKey_Pattern(t *testing.T) { input: fmt.Sprintf("algolia: '%s'", validPattern), want: []string{"ADMIN01KEY:AlgoliaAdminKey010TESTINGPlmiOPC"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("algolia keyword is not close to the real key and secret = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("algolia: '%s'", invalidPattern), diff --git a/pkg/detectors/alienvault/alienvault_test.go b/pkg/detectors/alienvault/alienvault_test.go index 514c5de3486f..67d80f94f781 100644 --- a/pkg/detectors/alienvault/alienvault_test.go +++ b/pkg/detectors/alienvault/alienvault_test.go @@ -30,11 +30,6 @@ func TestAlienVault_Pattern(t *testing.T) { input: fmt.Sprintf("alienvault: '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("alienvault keyword is not close to the real key in the data\n = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("alienvault: '%s'", invalidPattern), diff --git a/pkg/detectors/allsports/allsports_test.go b/pkg/detectors/allsports/allsports_test.go index 81414fd8f655..dcb0eb552d3f 100644 --- a/pkg/detectors/allsports/allsports_test.go +++ b/pkg/detectors/allsports/allsports_test.go @@ -30,11 +30,6 @@ func TestAllSports_Pattern(t *testing.T) { input: fmt.Sprintf("allsports: '%s'", validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("allsports keyword is not close to the real key in the data\n = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("allsports: '%s'", invalidPattern), diff --git a/pkg/detectors/amadeus/amadeus_test.go b/pkg/detectors/amadeus/amadeus_test.go index 5437f5f067e6..91b729b6899f 100644 --- a/pkg/detectors/amadeus/amadeus_test.go +++ b/pkg/detectors/amadeus/amadeus_test.go @@ -30,11 +30,6 @@ func TestAmadeus_Pattern(t *testing.T) { input: fmt.Sprintf("amadeus: '%s'", validPattern), want: []string{"A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6A1b2C3d4E5f6G7ho"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("amadeus keyword is not close to the real key in the data\n = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("amadeus: '%s'", invalidPattern), diff --git a/pkg/detectors/ambee/ambee_test.go b/pkg/detectors/ambee/ambee_test.go index 12dc72b4552f..2742861f6a9d 100644 --- a/pkg/detectors/ambee/ambee_test.go +++ b/pkg/detectors/ambee/ambee_test.go @@ -30,11 +30,6 @@ func TestAmbee_Pattern(t *testing.T) { input: fmt.Sprintf("ambee: '%s'", validPattern), want: []string{"a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("ambee keyword is not close to the real key in the data\n = '%s'", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("ambee: '%s'", invalidPattern), diff --git a/pkg/detectors/checkvist/checkvist_test.go b/pkg/detectors/checkvist/checkvist_test.go index 86525059cf5e..a744eebcfab4 100644 --- a/pkg/detectors/checkvist/checkvist_test.go +++ b/pkg/detectors/checkvist/checkvist_test.go @@ -30,11 +30,6 @@ func TestCheckvist_Pattern(t *testing.T) { input: fmt.Sprintf("checkvist: %s", validPattern), want: []string{"wdvnusa87afxYntestuser1005@example.com"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("checkvist keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("checkvist: %s", invalidPattern), diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_test.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_test.go index fef882a30b73..e5f6c3546976 100644 --- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_test.go +++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey_test.go @@ -30,11 +30,6 @@ func TestCloudFlareGlobalAPIKey_Pattern(t *testing.T) { input: fmt.Sprintf("cloudflare: %s", validPattern), want: []string{"abcD123efg456HIJklmn789OPQ_rstUVWxYZ-testuser1005@example.com"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("cloudflare keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("cloudflare: %s", invalidPattern), diff --git a/pkg/detectors/cloze/cloze_test.go b/pkg/detectors/cloze/cloze_test.go index 71ba2d172071..e2e610a6dd9d 100644 --- a/pkg/detectors/cloze/cloze_test.go +++ b/pkg/detectors/cloze/cloze_test.go @@ -30,11 +30,6 @@ func TestCloze_Pattern(t *testing.T) { input: fmt.Sprintf("cloze: %s", validPattern), want: []string{"1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("cloze keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("cloze: %s", invalidPattern), diff --git a/pkg/detectors/currencycloud/currencycloud_test.go b/pkg/detectors/currencycloud/currencycloud_test.go index 29641af47874..c9f42bd627e2 100644 --- a/pkg/detectors/currencycloud/currencycloud_test.go +++ b/pkg/detectors/currencycloud/currencycloud_test.go @@ -30,11 +30,6 @@ func TestCurrencyCloud_Pattern(t *testing.T) { input: fmt.Sprintf("currencycloud: %s", validPattern), want: []string{"1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("currencycloud keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("currencycloud: %s", invalidPattern), diff --git a/pkg/detectors/gocanvas/gocanvas_test.go b/pkg/detectors/gocanvas/gocanvas_test.go index d711c2186d6b..021d79ccfa17 100644 --- a/pkg/detectors/gocanvas/gocanvas_test.go +++ b/pkg/detectors/gocanvas/gocanvas_test.go @@ -30,11 +30,6 @@ func TestGoCanvas_Pattern(t *testing.T) { input: fmt.Sprintf("gocanvas: %s", validPattern), want: []string{"Abc123+/Xyz456mnopQRStuvw89YZ12345678ABad6C="}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("gocanvas keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("gocanvas: %s", invalidPattern), diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey_test.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey_test.go index 6a28f1e99774..ecfaca694f84 100644 --- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey_test.go +++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey_test.go @@ -35,11 +35,6 @@ func TestIbmCloudUserKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/iconfinder/iconfinder_test.go b/pkg/detectors/iconfinder/iconfinder_test.go index 789b3f6f8e15..32a61dd1489a 100644 --- a/pkg/detectors/iconfinder/iconfinder_test.go +++ b/pkg/detectors/iconfinder/iconfinder_test.go @@ -34,12 +34,7 @@ func TestIconFinder_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/iexapis/iexapis_test.go b/pkg/detectors/iexapis/iexapis_test.go index 9923b4ec5c7f..37276286c3f5 100644 --- a/pkg/detectors/iexapis/iexapis_test.go +++ b/pkg/detectors/iexapis/iexapis_test.go @@ -34,12 +34,7 @@ func TestIexapis_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/iexcloud/iexcloud_test.go b/pkg/detectors/iexcloud/iexcloud_test.go index 80fb6de4c3df..bdcd11edf902 100644 --- a/pkg/detectors/iexcloud/iexcloud_test.go +++ b/pkg/detectors/iexcloud/iexcloud_test.go @@ -34,12 +34,7 @@ func TestIexcloud_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/imagekit/imagekit_test.go b/pkg/detectors/imagekit/imagekit_test.go index ebdb7eb69a7a..6d3c95aac0fd 100644 --- a/pkg/detectors/imagekit/imagekit_test.go +++ b/pkg/detectors/imagekit/imagekit_test.go @@ -34,12 +34,7 @@ func TestImagekit_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/imagga/imagga_test.go b/pkg/detectors/imagga/imagga_test.go index 1b3cf8d4a3b8..61e86aef93b3 100644 --- a/pkg/detectors/imagga/imagga_test.go +++ b/pkg/detectors/imagga/imagga_test.go @@ -34,12 +34,7 @@ func TestImagga_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/impala/impala_test.go b/pkg/detectors/impala/impala_test.go index 44eb20f87e18..495d5fd59d85 100644 --- a/pkg/detectors/impala/impala_test.go +++ b/pkg/detectors/impala/impala_test.go @@ -34,12 +34,7 @@ func TestImpala_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/infura/infura_test.go b/pkg/detectors/infura/infura_test.go index f8d66cc72ee9..1e70eda1ff48 100644 --- a/pkg/detectors/infura/infura_test.go +++ b/pkg/detectors/infura/infura_test.go @@ -34,12 +34,7 @@ func TestInfura_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/insightly/insightly_test.go b/pkg/detectors/insightly/insightly_test.go index e25ea9c2e394..c09afc272480 100644 --- a/pkg/detectors/insightly/insightly_test.go +++ b/pkg/detectors/insightly/insightly_test.go @@ -34,12 +34,7 @@ func TestInsightly_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/instabot/instabot_test.go b/pkg/detectors/instabot/instabot_test.go index 3866807957d9..702debb8e090 100644 --- a/pkg/detectors/instabot/instabot_test.go +++ b/pkg/detectors/instabot/instabot_test.go @@ -34,12 +34,7 @@ func TestInstabot_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/instamojo/instamojo_test.go b/pkg/detectors/instamojo/instamojo_test.go index 7c7a0939020a..6300e0cbb9c9 100644 --- a/pkg/detectors/instamojo/instamojo_test.go +++ b/pkg/detectors/instamojo/instamojo_test.go @@ -31,12 +31,7 @@ func TestInstamojo_Pattern(t *testing.T) { name: "valid pattern - with keyword instamojo", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validSecretPattern), want: []string{"ZrGOAl9jlTlAKxw4hXZXeRmd6wvndEr2pX0fqDv2"}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' secret = '%s'", keyword, validKeyPattern, validSecretPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' secret = '%s'", keyword, invalidKeyPattern, invalidSecretPattern), diff --git a/pkg/detectors/intercom/intercom_test.go b/pkg/detectors/intercom/intercom_test.go index 38258fe996dd..bf252ff182f6 100644 --- a/pkg/detectors/intercom/intercom_test.go +++ b/pkg/detectors/intercom/intercom_test.go @@ -34,12 +34,7 @@ func TestInterCom_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/interseller/interseller_test.go b/pkg/detectors/interseller/interseller_test.go index a63eb15a169b..a9e5e08cc563 100644 --- a/pkg/detectors/interseller/interseller_test.go +++ b/pkg/detectors/interseller/interseller_test.go @@ -34,12 +34,7 @@ func TestInterseller_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/intrinio/intrinio_test.go b/pkg/detectors/intrinio/intrinio_test.go index eb80da4c6285..f86e0f459d58 100644 --- a/pkg/detectors/intrinio/intrinio_test.go +++ b/pkg/detectors/intrinio/intrinio_test.go @@ -34,12 +34,7 @@ func TestIntrinio_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/invoiceocean/invoiceocean_test.go b/pkg/detectors/invoiceocean/invoiceocean_test.go index c61daa3c2b4a..488601ad34c3 100644 --- a/pkg/detectors/invoiceocean/invoiceocean_test.go +++ b/pkg/detectors/invoiceocean/invoiceocean_test.go @@ -32,11 +32,6 @@ func TestInvoiceocean_Pattern(t *testing.T) { input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validUrlPattern), want: []string{"ZWd1e2141Q2R1ds23sdX"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' secret = '%s'", keyword, validKeyPattern, validUrlPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' secret = '%s'", keyword, invalidKeyPattern, invalidUrlPattern), diff --git a/pkg/detectors/ip2location/ip2location_test.go b/pkg/detectors/ip2location/ip2location_test.go index f8b762c6f6a1..ef07f78dfa97 100644 --- a/pkg/detectors/ip2location/ip2location_test.go +++ b/pkg/detectors/ip2location/ip2location_test.go @@ -34,12 +34,7 @@ func TestIp2location_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipapi/ipapi_test.go b/pkg/detectors/ipapi/ipapi_test.go index d885b5776d16..57c94f8a50eb 100644 --- a/pkg/detectors/ipapi/ipapi_test.go +++ b/pkg/detectors/ipapi/ipapi_test.go @@ -34,12 +34,7 @@ func TestIpapi_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipgeolocation/ipgeolocation_test.go b/pkg/detectors/ipgeolocation/ipgeolocation_test.go index af16678365d3..686fd0055c65 100644 --- a/pkg/detectors/ipgeolocation/ipgeolocation_test.go +++ b/pkg/detectors/ipgeolocation/ipgeolocation_test.go @@ -35,11 +35,6 @@ func TestIPGeolocation_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipinfo/ipinfo_test.go b/pkg/detectors/ipinfo/ipinfo_test.go index 6302b7311308..2528c2e53a57 100644 --- a/pkg/detectors/ipinfo/ipinfo_test.go +++ b/pkg/detectors/ipinfo/ipinfo_test.go @@ -34,12 +34,7 @@ func TestIpinfo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipinfodb/ipinfodb_test.go b/pkg/detectors/ipinfodb/ipinfodb_test.go index ed03951a5611..a06844b2c6a1 100644 --- a/pkg/detectors/ipinfodb/ipinfodb_test.go +++ b/pkg/detectors/ipinfodb/ipinfodb_test.go @@ -34,12 +34,7 @@ func TestIPinfoDB_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipquality/ipquality_test.go b/pkg/detectors/ipquality/ipquality_test.go index da88ce74d18e..3c6d6877158c 100644 --- a/pkg/detectors/ipquality/ipquality_test.go +++ b/pkg/detectors/ipquality/ipquality_test.go @@ -34,12 +34,7 @@ func TestIpquality_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ipstack/ipstack_test.go b/pkg/detectors/ipstack/ipstack_test.go index de9b9e997889..74fbd228a31d 100644 --- a/pkg/detectors/ipstack/ipstack_test.go +++ b/pkg/detectors/ipstack/ipstack_test.go @@ -34,12 +34,7 @@ func TestIpStack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/jiratoken/v1/jiratoken_test.go b/pkg/detectors/jiratoken/v1/jiratoken_test.go index 00e6644dbf5f..f48a784e7b18 100644 --- a/pkg/detectors/jiratoken/v1/jiratoken_test.go +++ b/pkg/detectors/jiratoken/v1/jiratoken_test.go @@ -34,11 +34,6 @@ func TestJiraToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s %s \n%s %s\n%s %s", keyword, validTokenPattern, keyword, validDomainPattern, keyword, validEmailPattern), want: []string{validEmailPattern + ":" + validTokenPattern + ":" + validDomainPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' domain = '%s' email = '%s'", keyword, validTokenPattern, validDomainPattern, validEmailPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' domain = '%s' email = '%s'", keyword, invalidTokenPattern, invalidDomainPattern, invalidEmailPattern), diff --git a/pkg/detectors/jiratoken/v2/jiratoken_v2_test.go b/pkg/detectors/jiratoken/v2/jiratoken_v2_test.go index 0d8acaf36343..b876f422ee8a 100644 --- a/pkg/detectors/jiratoken/v2/jiratoken_v2_test.go +++ b/pkg/detectors/jiratoken/v2/jiratoken_v2_test.go @@ -34,11 +34,6 @@ func TestJiraToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s %s \n%s %s\n%s %s", keyword, validTokenPattern, keyword, validDomainPattern, keyword, validEmailPattern), want: []string{validEmailPattern + ":" + validTokenPattern + ":" + validDomainPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' domain = '%s' email = '%s'", keyword, validTokenPattern, validDomainPattern, validEmailPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' domain = '%s' email = '%s'", keyword, invalidTokenPattern, invalidDomainPattern, invalidEmailPattern), diff --git a/pkg/detectors/jotform/jotform_test.go b/pkg/detectors/jotform/jotform_test.go index 0bf25cfb5aa4..6e8cb104db93 100644 --- a/pkg/detectors/jotform/jotform_test.go +++ b/pkg/detectors/jotform/jotform_test.go @@ -34,12 +34,7 @@ func TestJotform_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/jumpcloud/jumpcloud_test.go b/pkg/detectors/jumpcloud/jumpcloud_test.go index 78438f55ea44..b82c114c987c 100644 --- a/pkg/detectors/jumpcloud/jumpcloud_test.go +++ b/pkg/detectors/jumpcloud/jumpcloud_test.go @@ -34,12 +34,7 @@ func TestJumpcloud_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/jupiterone/jupiterone_test.go b/pkg/detectors/jupiterone/jupiterone_test.go index 240e23067ee4..fdb70de889b5 100644 --- a/pkg/detectors/jupiterone/jupiterone_test.go +++ b/pkg/detectors/jupiterone/jupiterone_test.go @@ -34,12 +34,7 @@ func TestJupiterone_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/juro/juro_test.go b/pkg/detectors/juro/juro_test.go index fe435c672588..594914c86feb 100644 --- a/pkg/detectors/juro/juro_test.go +++ b/pkg/detectors/juro/juro_test.go @@ -34,12 +34,7 @@ func TestJuro_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/kanban/kanban_test.go b/pkg/detectors/kanban/kanban_test.go index 2dd9e9502b41..41a5bcb8d9c6 100644 --- a/pkg/detectors/kanban/kanban_test.go +++ b/pkg/detectors/kanban/kanban_test.go @@ -31,12 +31,7 @@ func TestKanban_Pattern(t *testing.T) { name: "valid pattern - with keyword kanban", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validUrlPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' url = '%s'", keyword, validKeyPattern, validUrlPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidUrlPattern), diff --git a/pkg/detectors/kanbantool/kanbantool_test.go b/pkg/detectors/kanbantool/kanbantool_test.go index e4a7b5b14a63..db92dde2a476 100644 --- a/pkg/detectors/kanbantool/kanbantool_test.go +++ b/pkg/detectors/kanbantool/kanbantool_test.go @@ -31,12 +31,7 @@ func TestKanbantool_Pattern(t *testing.T) { name: "valid pattern - with keyword kanbantool", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validDomainPattern), want: []string{validKeyPattern, validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n key = '%s' domain: '%s'", keyword, validKeyPattern, validDomainPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' secret = '%s'", keyword, invalidKeyPattern, invalidDomainPattern), diff --git a/pkg/detectors/karmacrm/karmacrm_test.go b/pkg/detectors/karmacrm/karmacrm_test.go index 9b5ffd077e31..e5c98baa79b1 100644 --- a/pkg/detectors/karmacrm/karmacrm_test.go +++ b/pkg/detectors/karmacrm/karmacrm_test.go @@ -34,12 +34,7 @@ func TestKarmaCRM_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/keenio/keenio_test.go b/pkg/detectors/keenio/keenio_test.go index db2e243b80ea..473cf8cf3362 100644 --- a/pkg/detectors/keenio/keenio_test.go +++ b/pkg/detectors/keenio/keenio_test.go @@ -31,12 +31,7 @@ func TestKeenIO_Pattern(t *testing.T) { name: "valid pattern - with keyword keenio", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validIdPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n key = '%s' domain: '%s'", keyword, validKeyPattern, validIdPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' %s secret = '%s'", keyword, invalidKeyPattern, keyword, invalidIdPattern), diff --git a/pkg/detectors/kickbox/kickbox_test.go b/pkg/detectors/kickbox/kickbox_test.go index 26c691fa0d3f..a95cda2cd46c 100644 --- a/pkg/detectors/kickbox/kickbox_test.go +++ b/pkg/detectors/kickbox/kickbox_test.go @@ -34,12 +34,7 @@ func TestKickbox_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/klipfolio/klipfolio_test.go b/pkg/detectors/klipfolio/klipfolio_test.go index 26bcf43ce608..a6144cf719cb 100644 --- a/pkg/detectors/klipfolio/klipfolio_test.go +++ b/pkg/detectors/klipfolio/klipfolio_test.go @@ -34,12 +34,7 @@ func TestKlipfolio_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/knapsackpro/knapsackpro_test.go b/pkg/detectors/knapsackpro/knapsackpro_test.go index acc32e336481..5eb20aa72b44 100644 --- a/pkg/detectors/knapsackpro/knapsackpro_test.go +++ b/pkg/detectors/knapsackpro/knapsackpro_test.go @@ -34,12 +34,7 @@ func TestKnapsackPro_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/kontent/kontent_test.go b/pkg/detectors/kontent/kontent_test.go index eca9a657bf33..b3986f4d69c0 100644 --- a/pkg/detectors/kontent/kontent_test.go +++ b/pkg/detectors/kontent/kontent_test.go @@ -34,12 +34,7 @@ func TestKontent_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/kraken/kraken_test.go b/pkg/detectors/kraken/kraken_test.go index 0c4153815eea..8c82160c47d9 100644 --- a/pkg/detectors/kraken/kraken_test.go +++ b/pkg/detectors/kraken/kraken_test.go @@ -32,12 +32,7 @@ func TestKraken_Pattern(t *testing.T) { name: "valid pattern - with keyword kraken", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validPrivKeyPattern), want: []string{strings.TrimSpace(validKeyPattern) + strings.TrimSpace(validPrivKeyPattern)}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n key = '%s' domain: '%s'", keyword, validKeyPattern, validPrivKeyPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' secret = '%s'", keyword, invalidKeyPattern, invalidPrivKeyPattern), diff --git a/pkg/detectors/kucoin/kucoin_test.go b/pkg/detectors/kucoin/kucoin_test.go index 1affdf9cab90..4a7bfb4b2282 100644 --- a/pkg/detectors/kucoin/kucoin_test.go +++ b/pkg/detectors/kucoin/kucoin_test.go @@ -33,12 +33,7 @@ func TestKuCoin_Pattern(t *testing.T) { name: "valid pattern - with keyword kucoin", input: fmt.Sprintf("%s %s %s %s %s %s", keyword, validPassphrasePattern, keyword, validSecretPattern, keyword, validKeyPattern), want: []string{validKeyPattern + validPassphrasePattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' domain = '%s' email = '%s'", keyword, validKeyPattern, validSecretPattern, validPassphrasePattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' domain = '%s' email = '%s'", keyword, invalidKeyPattern, invalidSecretPattern, invalidPassphrasePattern), diff --git a/pkg/detectors/kylas/kylas_test.go b/pkg/detectors/kylas/kylas_test.go index 3bb1deed4a0e..a569bf8f537a 100644 --- a/pkg/detectors/kylas/kylas_test.go +++ b/pkg/detectors/kylas/kylas_test.go @@ -34,12 +34,7 @@ func TestKylas_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/languagelayer/languagelayer_test.go b/pkg/detectors/languagelayer/languagelayer_test.go index 07c4cb84536b..415b7156b4b8 100644 --- a/pkg/detectors/languagelayer/languagelayer_test.go +++ b/pkg/detectors/languagelayer/languagelayer_test.go @@ -35,11 +35,6 @@ func TestLanguageLayer_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/leadfeeder/leadfeeder_test.go b/pkg/detectors/leadfeeder/leadfeeder_test.go index a8a4dff8e040..1be90eb95fbe 100644 --- a/pkg/detectors/leadfeeder/leadfeeder_test.go +++ b/pkg/detectors/leadfeeder/leadfeeder_test.go @@ -34,12 +34,7 @@ func TestLeadfeeder_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lemlist/lemlist_test.go b/pkg/detectors/lemlist/lemlist_test.go index e97b66c81075..9b80bb2e57dd 100644 --- a/pkg/detectors/lemlist/lemlist_test.go +++ b/pkg/detectors/lemlist/lemlist_test.go @@ -34,12 +34,7 @@ func TestLemlist_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lemonsqueezy/lemonsqueezy_test.go b/pkg/detectors/lemonsqueezy/lemonsqueezy_test.go index d69900113486..b41a14d47cdb 100644 --- a/pkg/detectors/lemonsqueezy/lemonsqueezy_test.go +++ b/pkg/detectors/lemonsqueezy/lemonsqueezy_test.go @@ -35,11 +35,6 @@ func TestLemonsqueezy_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lendflow/lendflow_test.go b/pkg/detectors/lendflow/lendflow_test.go index b19fe00d8209..e1fec5747a8a 100644 --- a/pkg/detectors/lendflow/lendflow_test.go +++ b/pkg/detectors/lendflow/lendflow_test.go @@ -34,12 +34,7 @@ func TestLendflow_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm_test.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm_test.go index c81b1f309a90..19fbdd34d752 100644 --- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm_test.go +++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm_test.go @@ -35,11 +35,6 @@ func TestLessAnnoyingCRM_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lexigram/lexigram_test.go b/pkg/detectors/lexigram/lexigram_test.go index 36f81079f1b0..85e0b39bf351 100644 --- a/pkg/detectors/lexigram/lexigram_test.go +++ b/pkg/detectors/lexigram/lexigram_test.go @@ -34,12 +34,7 @@ func TestLexigram_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/linemessaging/linemessaging_test.go b/pkg/detectors/linemessaging/linemessaging_test.go index ad4f2262c0c4..40747ecaa372 100644 --- a/pkg/detectors/linemessaging/linemessaging_test.go +++ b/pkg/detectors/linemessaging/linemessaging_test.go @@ -35,11 +35,6 @@ func TestLineMessaging_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/linenotify/linenotify_test.go b/pkg/detectors/linenotify/linenotify_test.go index 9de765456a8a..45d6e40c17f1 100644 --- a/pkg/detectors/linenotify/linenotify_test.go +++ b/pkg/detectors/linenotify/linenotify_test.go @@ -34,12 +34,7 @@ func TestLineNotify_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/linkpreview/linkpreview_test.go b/pkg/detectors/linkpreview/linkpreview_test.go index 834f8e707907..28782879cb09 100644 --- a/pkg/detectors/linkpreview/linkpreview_test.go +++ b/pkg/detectors/linkpreview/linkpreview_test.go @@ -34,12 +34,7 @@ func TestLinkPreview_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/liveagent/liveagent_test.go b/pkg/detectors/liveagent/liveagent_test.go index efa42b93d24a..072652f7c96b 100644 --- a/pkg/detectors/liveagent/liveagent_test.go +++ b/pkg/detectors/liveagent/liveagent_test.go @@ -31,12 +31,7 @@ func TestLiveAgent_Pattern(t *testing.T) { name: "valid pattern - with keyword liveagent", input: fmt.Sprintf("%s '%s' '%s'", keyword, validKeyPattern, validDomainPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validKeyPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidDomainPattern), diff --git a/pkg/detectors/livestorm/livestorm_test.go b/pkg/detectors/livestorm/livestorm_test.go index e17c41811f61..35f28f6e1882 100644 --- a/pkg/detectors/livestorm/livestorm_test.go +++ b/pkg/detectors/livestorm/livestorm_test.go @@ -35,12 +35,7 @@ func TestLivestorm_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{strings.TrimSpace(validPattern)}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/loadmill/loadmill_test.go b/pkg/detectors/loadmill/loadmill_test.go index cbad6be965c0..f4ba0d6f53cf 100644 --- a/pkg/detectors/loadmill/loadmill_test.go +++ b/pkg/detectors/loadmill/loadmill_test.go @@ -34,12 +34,7 @@ func TestLoadmill_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lob/lob_test.go b/pkg/detectors/lob/lob_test.go index 3483cb6f7ab0..8c74f061c119 100644 --- a/pkg/detectors/lob/lob_test.go +++ b/pkg/detectors/lob/lob_test.go @@ -34,12 +34,7 @@ func TestLob_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/loggly/loggly_test.go b/pkg/detectors/loggly/loggly_test.go index 26ea7009f2bd..e7e6dddd5064 100644 --- a/pkg/detectors/loggly/loggly_test.go +++ b/pkg/detectors/loggly/loggly_test.go @@ -31,12 +31,7 @@ func TestLoggly_Pattern(t *testing.T) { name: "valid pattern - with keyword loggly", input: fmt.Sprintf("%s '%s' '%s'", keyword, validKeyPattern, validDomainPattern), want: []string{validDomainPattern + ":" + validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validKeyPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidDomainPattern), diff --git a/pkg/detectors/loginradius/loginradius_test.go b/pkg/detectors/loginradius/loginradius_test.go index 83e10c6f3f45..df9f78233618 100644 --- a/pkg/detectors/loginradius/loginradius_test.go +++ b/pkg/detectors/loginradius/loginradius_test.go @@ -34,12 +34,7 @@ func TestLoginradius_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/logzio/logzio_test.go b/pkg/detectors/logzio/logzio_test.go index ec299d97cee1..b9da0011f08d 100644 --- a/pkg/detectors/logzio/logzio_test.go +++ b/pkg/detectors/logzio/logzio_test.go @@ -34,12 +34,7 @@ func TestLogzIO_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lokalisetoken/lokalisetoken_test.go b/pkg/detectors/lokalisetoken/lokalisetoken_test.go index 1d8ebfef576e..000d19308c51 100644 --- a/pkg/detectors/lokalisetoken/lokalisetoken_test.go +++ b/pkg/detectors/lokalisetoken/lokalisetoken_test.go @@ -35,11 +35,6 @@ func TestLokaliseToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/loyverse/loyverse_test.go b/pkg/detectors/loyverse/loyverse_test.go index 39dc883bbc2e..cf2c6a2c1564 100644 --- a/pkg/detectors/loyverse/loyverse_test.go +++ b/pkg/detectors/loyverse/loyverse_test.go @@ -34,12 +34,7 @@ func TestLoyverse_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/lunchmoney/lunchmoney_test.go b/pkg/detectors/lunchmoney/lunchmoney_test.go index 71dc48bb28d3..5dc229fef551 100644 --- a/pkg/detectors/lunchmoney/lunchmoney_test.go +++ b/pkg/detectors/lunchmoney/lunchmoney_test.go @@ -34,12 +34,7 @@ func TestLunchMoney_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/luno/luno_test.go b/pkg/detectors/luno/luno_test.go index 8428e9bb8731..34c976da1311 100644 --- a/pkg/detectors/luno/luno_test.go +++ b/pkg/detectors/luno/luno_test.go @@ -31,12 +31,7 @@ func TestLuno_Pattern(t *testing.T) { name: "valid pattern - with keyword luno", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validIdPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' url = '%s'", keyword, validKeyPattern, validIdPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidIdPattern), diff --git a/pkg/detectors/m3o/m3o_test.go b/pkg/detectors/m3o/m3o_test.go index 4454f1eb0bbb..95ee4fb4e80a 100644 --- a/pkg/detectors/m3o/m3o_test.go +++ b/pkg/detectors/m3o/m3o_test.go @@ -34,12 +34,7 @@ func TestM3o_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/madkudu/madkudu_test.go b/pkg/detectors/madkudu/madkudu_test.go index f803b6b9a404..e1b8baceb65a 100644 --- a/pkg/detectors/madkudu/madkudu_test.go +++ b/pkg/detectors/madkudu/madkudu_test.go @@ -34,12 +34,7 @@ func TestMadKudu_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/magicbell/magicbell_test.go b/pkg/detectors/magicbell/magicbell_test.go index 0476897ff40d..b1905d965de2 100644 --- a/pkg/detectors/magicbell/magicbell_test.go +++ b/pkg/detectors/magicbell/magicbell_test.go @@ -30,11 +30,6 @@ func TestMagicBell_Pattern(t *testing.T) { input: fmt.Sprintf("magicbell: %s", validPattern), want: []string{"abcde12345-67890fghijklmnopqrs-tuvwxyzYu"}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("magicbell keyword is not close to the real key and id = %s", validPattern), - want: nil, - }, { name: "invalid pattern", input: fmt.Sprintf("magicbell: %s", invalidPattern), diff --git a/pkg/detectors/magnetic/magnetic_test.go b/pkg/detectors/magnetic/magnetic_test.go index 7dd179a67db4..5d7defe3b194 100644 --- a/pkg/detectors/magnetic/magnetic_test.go +++ b/pkg/detectors/magnetic/magnetic_test.go @@ -34,12 +34,7 @@ func TestMagnetic_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailboxlayer/mailboxlayer_test.go b/pkg/detectors/mailboxlayer/mailboxlayer_test.go index 4ad46a4e8f5b..60da480dbacc 100644 --- a/pkg/detectors/mailboxlayer/mailboxlayer_test.go +++ b/pkg/detectors/mailboxlayer/mailboxlayer_test.go @@ -35,11 +35,6 @@ func TestMailboxplayer_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailerlite/mailerlite_test.go b/pkg/detectors/mailerlite/mailerlite_test.go index 4c256795a4ca..8540cc788471 100644 --- a/pkg/detectors/mailerlite/mailerlite_test.go +++ b/pkg/detectors/mailerlite/mailerlite_test.go @@ -34,12 +34,7 @@ func TestMailerlite_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth_test.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth_test.go index 4807637b9801..16577fb6c3b7 100644 --- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth_test.go +++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth_test.go @@ -35,11 +35,6 @@ func TestMailJetBasicAuth_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailjetsms/mailjetsms_test.go b/pkg/detectors/mailjetsms/mailjetsms_test.go index b7c4cb158f82..4b4ec759b55b 100644 --- a/pkg/detectors/mailjetsms/mailjetsms_test.go +++ b/pkg/detectors/mailjetsms/mailjetsms_test.go @@ -34,12 +34,7 @@ func TestMailJetSMS_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailmodo/mailmodo_test.go b/pkg/detectors/mailmodo/mailmodo_test.go index bd23002013af..541b9f615e6d 100644 --- a/pkg/detectors/mailmodo/mailmodo_test.go +++ b/pkg/detectors/mailmodo/mailmodo_test.go @@ -34,12 +34,7 @@ func TestMailmodo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mailsac/mailsac_test.go b/pkg/detectors/mailsac/mailsac_test.go index ed5cacb19e4b..898a47ad2e54 100644 --- a/pkg/detectors/mailsac/mailsac_test.go +++ b/pkg/detectors/mailsac/mailsac_test.go @@ -34,12 +34,7 @@ func TestMailsac_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mandrill/mandrill_test.go b/pkg/detectors/mandrill/mandrill_test.go index f0db6f0a5ce1..2c009ebd24fd 100644 --- a/pkg/detectors/mandrill/mandrill_test.go +++ b/pkg/detectors/mandrill/mandrill_test.go @@ -34,12 +34,7 @@ func TestMandrill_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/manifest/manifest_test.go b/pkg/detectors/manifest/manifest_test.go index da55ea366354..4e4a17795f44 100644 --- a/pkg/detectors/manifest/manifest_test.go +++ b/pkg/detectors/manifest/manifest_test.go @@ -34,12 +34,7 @@ func TestManifest_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mapquest/mapquest_test.go b/pkg/detectors/mapquest/mapquest_test.go index 6ce41ccb0dee..d6e2fe112260 100644 --- a/pkg/detectors/mapquest/mapquest_test.go +++ b/pkg/detectors/mapquest/mapquest_test.go @@ -34,12 +34,7 @@ func TestMapquest_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/marketstack/marketstack_test.go b/pkg/detectors/marketstack/marketstack_test.go index 6f512fc575dd..905711f349ae 100644 --- a/pkg/detectors/marketstack/marketstack_test.go +++ b/pkg/detectors/marketstack/marketstack_test.go @@ -34,12 +34,7 @@ func TestMarketstack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_test.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_test.go index 93b6f5614e81..1af3f98a1b0d 100644 --- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_test.go +++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_test.go @@ -32,11 +32,6 @@ func TestMattermostPersonalToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validServerPattern), want: []string{validKeyPattern + validServerPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validServerPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidServerPattern), diff --git a/pkg/detectors/mavenlink/mavenlink_test.go b/pkg/detectors/mavenlink/mavenlink_test.go index 4cac3d74e5d9..7d61e9ebe8c7 100644 --- a/pkg/detectors/mavenlink/mavenlink_test.go +++ b/pkg/detectors/mavenlink/mavenlink_test.go @@ -34,12 +34,7 @@ func TestMavenlink_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/maxmindlicense/v1/maxmindlicense_test.go b/pkg/detectors/maxmindlicense/v1/maxmindlicense_test.go index 5a1ed541b6b1..e8cba28afc2f 100644 --- a/pkg/detectors/maxmindlicense/v1/maxmindlicense_test.go +++ b/pkg/detectors/maxmindlicense/v1/maxmindlicense_test.go @@ -32,11 +32,6 @@ func TestMaxMindLicense_Pattern(t *testing.T) { input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validIdPattern), want: []string{validKeyPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validIdPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidIdPattern), diff --git a/pkg/detectors/meaningcloud/meaningcloud_test.go b/pkg/detectors/meaningcloud/meaningcloud_test.go index 31b2678193af..9954c261ee74 100644 --- a/pkg/detectors/meaningcloud/meaningcloud_test.go +++ b/pkg/detectors/meaningcloud/meaningcloud_test.go @@ -35,11 +35,6 @@ func TestMeaningCloud_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mediastack/mediastack_test.go b/pkg/detectors/mediastack/mediastack_test.go index 7dc610bc5ccf..6bf39542ef45 100644 --- a/pkg/detectors/mediastack/mediastack_test.go +++ b/pkg/detectors/mediastack/mediastack_test.go @@ -34,12 +34,7 @@ func TestMediaStack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/meistertask/meistertask_test.go b/pkg/detectors/meistertask/meistertask_test.go index 52dc8eae5206..c1085901988a 100644 --- a/pkg/detectors/meistertask/meistertask_test.go +++ b/pkg/detectors/meistertask/meistertask_test.go @@ -34,12 +34,7 @@ func TestMeistertask_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mesibo/mesibo_test.go b/pkg/detectors/mesibo/mesibo_test.go index 432e7c11b384..a35bea206b32 100644 --- a/pkg/detectors/mesibo/mesibo_test.go +++ b/pkg/detectors/mesibo/mesibo_test.go @@ -34,12 +34,7 @@ func TestMesibo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/messagebird/messagebird_test.go b/pkg/detectors/messagebird/messagebird_test.go index 0d506895e628..d05655d56958 100644 --- a/pkg/detectors/messagebird/messagebird_test.go +++ b/pkg/detectors/messagebird/messagebird_test.go @@ -34,12 +34,7 @@ func TestMessageBird_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/metaapi/metaapi_test.go b/pkg/detectors/metaapi/metaapi_test.go index 907114734440..26b97996a866 100644 --- a/pkg/detectors/metaapi/metaapi_test.go +++ b/pkg/detectors/metaapi/metaapi_test.go @@ -31,12 +31,7 @@ func TestMetaAPI_Pattern(t *testing.T) { name: "valid key pattern - with keyword metaapi", input: fmt.Sprintf("%s %s %s %s", keyword, validKeyPattern, keyword, validSpellPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validSpellPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidSpellPattern), diff --git a/pkg/detectors/metabase/metabase_test.go b/pkg/detectors/metabase/metabase_test.go index 0e9580321067..6024cb1bd0e6 100644 --- a/pkg/detectors/metabase/metabase_test.go +++ b/pkg/detectors/metabase/metabase_test.go @@ -31,12 +31,7 @@ func TestMetabase_Pattern(t *testing.T) { name: "valid pattern - with keyword metabase", input: fmt.Sprintf("%s '%s' %s '%s'", keyword, validKeyPattern, keyword, validBaseUrlPattern), want: []string{validKeyPattern + validBaseUrlPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validBaseUrlPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidBaseUrlPattern), diff --git a/pkg/detectors/metrilo/metrilo_test.go b/pkg/detectors/metrilo/metrilo_test.go index 4f2e7e7171dc..7a23b35c33ff 100644 --- a/pkg/detectors/metrilo/metrilo_test.go +++ b/pkg/detectors/metrilo/metrilo_test.go @@ -34,12 +34,7 @@ func TestMetrilo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mindmeister/mindmeister_test.go b/pkg/detectors/mindmeister/mindmeister_test.go index 83190071506f..c6ede88e03d6 100644 --- a/pkg/detectors/mindmeister/mindmeister_test.go +++ b/pkg/detectors/mindmeister/mindmeister_test.go @@ -34,12 +34,7 @@ func TestMindmeister_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/miro/miro_test.go b/pkg/detectors/miro/miro_test.go index 18a1c45b60c3..a200cdf4f0c4 100644 --- a/pkg/detectors/miro/miro_test.go +++ b/pkg/detectors/miro/miro_test.go @@ -34,12 +34,7 @@ func TestMiro_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mite/mite_test.go b/pkg/detectors/mite/mite_test.go index 1d54fa520e9a..2038a8c04270 100644 --- a/pkg/detectors/mite/mite_test.go +++ b/pkg/detectors/mite/mite_test.go @@ -31,12 +31,7 @@ func TestMite_Pattern(t *testing.T) { name: "valid pattern - with keyword mite", input: fmt.Sprintf("%s '%s' '%s'", keyword, validKeyPattern, validUrlPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validKeyPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidUrlPattern), diff --git a/pkg/detectors/mixmax/mixmax_test.go b/pkg/detectors/mixmax/mixmax_test.go index 8e5ccaac3cf8..e396a0b9475d 100644 --- a/pkg/detectors/mixmax/mixmax_test.go +++ b/pkg/detectors/mixmax/mixmax_test.go @@ -34,12 +34,7 @@ func TestMixmax_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mixpanel/mixpanel_test.go b/pkg/detectors/mixpanel/mixpanel_test.go index 20a5b27eb0a6..2a493bf6226b 100644 --- a/pkg/detectors/mixpanel/mixpanel_test.go +++ b/pkg/detectors/mixpanel/mixpanel_test.go @@ -31,12 +31,7 @@ func TestMixpanel_Pattern(t *testing.T) { name: "valid pattern - with keyword mixpanel", input: fmt.Sprintf("%s %s %s", keyword, validKeyPattern, validIdPattern), want: []string{validKeyPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validIdPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidIdPattern), diff --git a/pkg/detectors/mockaroo/mockaroo_test.go b/pkg/detectors/mockaroo/mockaroo_test.go index e9e3c524d46c..bc1ecf78c968 100644 --- a/pkg/detectors/mockaroo/mockaroo_test.go +++ b/pkg/detectors/mockaroo/mockaroo_test.go @@ -34,12 +34,7 @@ func TestMockaroo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/moderation/moderation_test.go b/pkg/detectors/moderation/moderation_test.go index 417039949573..d35d72a211f3 100644 --- a/pkg/detectors/moderation/moderation_test.go +++ b/pkg/detectors/moderation/moderation_test.go @@ -34,12 +34,7 @@ func TestModeration_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/monday/monday_test.go b/pkg/detectors/monday/monday_test.go index 910a0af5fef9..72f0a9949865 100644 --- a/pkg/detectors/monday/monday_test.go +++ b/pkg/detectors/monday/monday_test.go @@ -34,12 +34,7 @@ func TestMonday_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/monkeylearn/monkeylearn_test.go b/pkg/detectors/monkeylearn/monkeylearn_test.go index ecfb1aaa14a5..d5a1900aa3d8 100644 --- a/pkg/detectors/monkeylearn/monkeylearn_test.go +++ b/pkg/detectors/monkeylearn/monkeylearn_test.go @@ -34,12 +34,7 @@ func TestMonkeyLearn_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/moonclerk/moonclerk_test.go b/pkg/detectors/moonclerk/moonclerk_test.go index 4db653288983..439517d7774e 100644 --- a/pkg/detectors/moonclerk/moonclerk_test.go +++ b/pkg/detectors/moonclerk/moonclerk_test.go @@ -34,12 +34,7 @@ func TestMoonclerk_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/moosend/moosend_test.go b/pkg/detectors/moosend/moosend_test.go index 54463e95d05b..00cff5c4a14e 100644 --- a/pkg/detectors/moosend/moosend_test.go +++ b/pkg/detectors/moosend/moosend_test.go @@ -34,12 +34,7 @@ func TestMoosend_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/moralis/moralis_test.go b/pkg/detectors/moralis/moralis_test.go index 823ecc295803..74abb033d49c 100644 --- a/pkg/detectors/moralis/moralis_test.go +++ b/pkg/detectors/moralis/moralis_test.go @@ -35,11 +35,6 @@ func TestMoralis_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/mrticktock/mrticktock_test.go b/pkg/detectors/mrticktock/mrticktock_test.go index d3f627da49cc..2a407febcd50 100644 --- a/pkg/detectors/mrticktock/mrticktock_test.go +++ b/pkg/detectors/mrticktock/mrticktock_test.go @@ -32,11 +32,6 @@ func TestMrticktock_Pattern(t *testing.T) { input: fmt.Sprintf("%s %s %s", validEmailPattern, keyword, validPasswordPattern), want: []string{validEmailPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPasswordPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidEmailPattern, invalidPasswordPattern), diff --git a/pkg/detectors/mux/mux_test.go b/pkg/detectors/mux/mux_test.go index 2e67f7bb2d0c..76f93db97ac3 100644 --- a/pkg/detectors/mux/mux_test.go +++ b/pkg/detectors/mux/mux_test.go @@ -31,12 +31,7 @@ func TestMux_Pattern(t *testing.T) { name: "valid pattern - with keyword mux", input: fmt.Sprintf("%s '%s' %s ' %s '", keyword, validKeyPattern, keyword, validSecretPattern), want: []string{validKeyPattern + validSecretPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' secret = ' %s '", keyword, validKeyPattern, validSecretPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' secret = ' %s '", keyword, invalidKeyPattern, invalidSecretPattern), diff --git a/pkg/detectors/myfreshworks/myfreshworks_test.go b/pkg/detectors/myfreshworks/myfreshworks_test.go index c4dcbbc3b997..46385d67e231 100644 --- a/pkg/detectors/myfreshworks/myfreshworks_test.go +++ b/pkg/detectors/myfreshworks/myfreshworks_test.go @@ -32,11 +32,6 @@ func TestMyfreshworks_Pattern(t *testing.T) { input: fmt.Sprintf("%s %s %s", keyword, validKeyPattern, validIdPattern), want: []string{validKeyPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s' '%s'", keyword, validKeyPattern, validIdPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s key = '%s' url = '%s'", keyword, invalidKeyPattern, invalidIdPattern), diff --git a/pkg/detectors/myintervals/myintervals_test.go b/pkg/detectors/myintervals/myintervals_test.go index ff7576428fce..42cb3cf47d62 100644 --- a/pkg/detectors/myintervals/myintervals_test.go +++ b/pkg/detectors/myintervals/myintervals_test.go @@ -34,12 +34,7 @@ func TestMyintervals_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink_test.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink_test.go index 13bd7b235eef..c63427825760 100644 --- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink_test.go +++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink_test.go @@ -35,11 +35,6 @@ func TestNasdaqDataLink_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/netlify/netlify_test.go b/pkg/detectors/netlify/netlify_test.go index 5b95edde3b57..18575ad75d9a 100644 --- a/pkg/detectors/netlify/netlify_test.go +++ b/pkg/detectors/netlify/netlify_test.go @@ -34,12 +34,7 @@ func TestNetlify_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_test.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_test.go index d369fdd86705..45db37636ad0 100644 --- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_test.go +++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey_test.go @@ -35,11 +35,6 @@ func TestNewRelicPersonalApiKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/newsapi/newsapi_test.go b/pkg/detectors/newsapi/newsapi_test.go index 4a814875a2bd..db14ce8433d8 100644 --- a/pkg/detectors/newsapi/newsapi_test.go +++ b/pkg/detectors/newsapi/newsapi_test.go @@ -34,12 +34,7 @@ func TestNewsapi_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/newscatcher/newscatcher_test.go b/pkg/detectors/newscatcher/newscatcher_test.go index fadb05f0021d..bfcdb048f6bf 100644 --- a/pkg/detectors/newscatcher/newscatcher_test.go +++ b/pkg/detectors/newscatcher/newscatcher_test.go @@ -35,11 +35,6 @@ func TestNewscatcher_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nftport/nftport_test.go b/pkg/detectors/nftport/nftport_test.go index e0aff573dcd3..3874b3676ec5 100644 --- a/pkg/detectors/nftport/nftport_test.go +++ b/pkg/detectors/nftport/nftport_test.go @@ -35,11 +35,6 @@ func TestNftport_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ngrok/ngrok_test.go b/pkg/detectors/ngrok/ngrok_test.go index 85f8199001e2..fc1b676807a1 100644 --- a/pkg/detectors/ngrok/ngrok_test.go +++ b/pkg/detectors/ngrok/ngrok_test.go @@ -35,11 +35,6 @@ func TestNgrok_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nicereply/nicereply_test.go b/pkg/detectors/nicereply/nicereply_test.go index 5990ccda009b..a6d9e5c1b3db 100644 --- a/pkg/detectors/nicereply/nicereply_test.go +++ b/pkg/detectors/nicereply/nicereply_test.go @@ -34,12 +34,7 @@ func TestNicereply_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nimble/nimble_test.go b/pkg/detectors/nimble/nimble_test.go index cbdf9fe9579b..3a807f52f4af 100644 --- a/pkg/detectors/nimble/nimble_test.go +++ b/pkg/detectors/nimble/nimble_test.go @@ -35,11 +35,6 @@ func TestNimble_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/noticeable/noticeable_test.go b/pkg/detectors/noticeable/noticeable_test.go index fdb2fe3a9023..292c6a11742e 100644 --- a/pkg/detectors/noticeable/noticeable_test.go +++ b/pkg/detectors/noticeable/noticeable_test.go @@ -34,12 +34,7 @@ func TestNoticeable_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nozbeteams/nozbeteams_test.go b/pkg/detectors/nozbeteams/nozbeteams_test.go index 6872abbf3105..51df3cf7db0f 100644 --- a/pkg/detectors/nozbeteams/nozbeteams_test.go +++ b/pkg/detectors/nozbeteams/nozbeteams_test.go @@ -34,12 +34,7 @@ func TestNozbeTeams_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s\r' | '%s\r'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s\r'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s\r'", keyword, invalidPattern), diff --git a/pkg/detectors/npmtoken/npmtoken_test.go b/pkg/detectors/npmtoken/npmtoken_test.go index c85bd3418acc..d85849d90958 100644 --- a/pkg/detectors/npmtoken/npmtoken_test.go +++ b/pkg/detectors/npmtoken/npmtoken_test.go @@ -34,12 +34,7 @@ func TestNpmToken_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nugetapikey/nugetapikey_test.go b/pkg/detectors/nugetapikey/nugetapikey_test.go index 2f1661a90021..08c8dc1e26d7 100644 --- a/pkg/detectors/nugetapikey/nugetapikey_test.go +++ b/pkg/detectors/nugetapikey/nugetapikey_test.go @@ -34,12 +34,7 @@ func TestNugetapikey_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/numverify/numverify_test.go b/pkg/detectors/numverify/numverify_test.go index cac67f7a5bdf..9f230e7073d7 100644 --- a/pkg/detectors/numverify/numverify_test.go +++ b/pkg/detectors/numverify/numverify_test.go @@ -34,12 +34,7 @@ func TestNumverify_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/nylas/nylas_test.go b/pkg/detectors/nylas/nylas_test.go index 00b690b523ad..46403a61bd2a 100644 --- a/pkg/detectors/nylas/nylas_test.go +++ b/pkg/detectors/nylas/nylas_test.go @@ -35,11 +35,6 @@ func TestNylas_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/oanda/oanda_test.go b/pkg/detectors/oanda/oanda_test.go index 45a9652fd9e6..4e5cbf652131 100644 --- a/pkg/detectors/oanda/oanda_test.go +++ b/pkg/detectors/oanda/oanda_test.go @@ -35,11 +35,6 @@ func TestOanda_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/omnisend/omnisend_test.go b/pkg/detectors/omnisend/omnisend_test.go index 292325bb4ba6..8dc9ab6f7999 100644 --- a/pkg/detectors/omnisend/omnisend_test.go +++ b/pkg/detectors/omnisend/omnisend_test.go @@ -34,12 +34,7 @@ func TestOmnisend_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/oopspam/oopspam_test.go b/pkg/detectors/oopspam/oopspam_test.go index 9cef33fbec67..7b0b9636acc4 100644 --- a/pkg/detectors/oopspam/oopspam_test.go +++ b/pkg/detectors/oopspam/oopspam_test.go @@ -34,12 +34,7 @@ func TestOOPSpam_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/opencagedata/opencagedata_test.go b/pkg/detectors/opencagedata/opencagedata_test.go index 379831e0a96b..91b342866cb0 100644 --- a/pkg/detectors/opencagedata/opencagedata_test.go +++ b/pkg/detectors/opencagedata/opencagedata_test.go @@ -35,11 +35,6 @@ func TestOpenCageData_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/openuv/openuv_test.go b/pkg/detectors/openuv/openuv_test.go index 7445358d085d..9fac7bfbc368 100644 --- a/pkg/detectors/openuv/openuv_test.go +++ b/pkg/detectors/openuv/openuv_test.go @@ -34,12 +34,7 @@ func TestOpenuv_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/openweather/openweather_test.go b/pkg/detectors/openweather/openweather_test.go index de18fc216cb6..d433edb6950c 100644 --- a/pkg/detectors/openweather/openweather_test.go +++ b/pkg/detectors/openweather/openweather_test.go @@ -34,12 +34,7 @@ func TestOpenWeather_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/opsgenie/opsgenie_test.go b/pkg/detectors/opsgenie/opsgenie_test.go index d39ec36b5b09..268ed2d159ce 100644 --- a/pkg/detectors/opsgenie/opsgenie_test.go +++ b/pkg/detectors/opsgenie/opsgenie_test.go @@ -34,12 +34,7 @@ func TestOpsgenie_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/optimizely/optimizely_test.go b/pkg/detectors/optimizely/optimizely_test.go index 785c7c2266e3..d7fe7b6b62da 100644 --- a/pkg/detectors/optimizely/optimizely_test.go +++ b/pkg/detectors/optimizely/optimizely_test.go @@ -35,11 +35,6 @@ func TestOptimizely_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/overloop/overloop_test.go b/pkg/detectors/overloop/overloop_test.go index affeba8f20e6..f9e7405bfb27 100644 --- a/pkg/detectors/overloop/overloop_test.go +++ b/pkg/detectors/overloop/overloop_test.go @@ -34,12 +34,7 @@ func TestOverloop_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/owlbot/owlbot_test.go b/pkg/detectors/owlbot/owlbot_test.go index 39ce25cddc53..caffe495714e 100644 --- a/pkg/detectors/owlbot/owlbot_test.go +++ b/pkg/detectors/owlbot/owlbot_test.go @@ -34,12 +34,7 @@ func TestOwlbot_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/packagecloud/packagecloud_test.go b/pkg/detectors/packagecloud/packagecloud_test.go index a088ba827f55..29bb5bb12bce 100644 --- a/pkg/detectors/packagecloud/packagecloud_test.go +++ b/pkg/detectors/packagecloud/packagecloud_test.go @@ -35,11 +35,6 @@ func TestPackageCloud_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey_test.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey_test.go index bc00c25b05e9..c9ad70c23ac6 100644 --- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey_test.go +++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey_test.go @@ -35,11 +35,6 @@ func TestPagerDutyApiKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pandadoc/pandadoc_test.go b/pkg/detectors/pandadoc/pandadoc_test.go index d68ad4c8ce4c..f7c7fb4421d1 100644 --- a/pkg/detectors/pandadoc/pandadoc_test.go +++ b/pkg/detectors/pandadoc/pandadoc_test.go @@ -35,11 +35,6 @@ func TestPandadoc_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pandascore/pandascore_test.go b/pkg/detectors/pandascore/pandascore_test.go index 46922fd00cbc..d682fe2dad98 100644 --- a/pkg/detectors/pandascore/pandascore_test.go +++ b/pkg/detectors/pandascore/pandascore_test.go @@ -34,12 +34,7 @@ func TestPandaScore_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = ' %s ' | ' %s '", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = ' %s '", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = ' %s '", keyword, invalidPattern), diff --git a/pkg/detectors/paperform/paperform_test.go b/pkg/detectors/paperform/paperform_test.go index 23fc08e0393e..fca377837d4e 100644 --- a/pkg/detectors/paperform/paperform_test.go +++ b/pkg/detectors/paperform/paperform_test.go @@ -35,11 +35,6 @@ func TestPaperform_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/paralleldots/paralleldots_test.go b/pkg/detectors/paralleldots/paralleldots_test.go index 9fc8e7844492..928c4546f7f4 100644 --- a/pkg/detectors/paralleldots/paralleldots_test.go +++ b/pkg/detectors/paralleldots/paralleldots_test.go @@ -35,11 +35,6 @@ func TestParalleldots_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/parsehub/parsehub_test.go b/pkg/detectors/parsehub/parsehub_test.go index 79ad005ed70d..895f4d045a31 100644 --- a/pkg/detectors/parsehub/parsehub_test.go +++ b/pkg/detectors/parsehub/parsehub_test.go @@ -34,12 +34,7 @@ func TestParsehub_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/parsers/parsers_test.go b/pkg/detectors/parsers/parsers_test.go index eab1af259073..ff64b5046117 100644 --- a/pkg/detectors/parsers/parsers_test.go +++ b/pkg/detectors/parsers/parsers_test.go @@ -35,11 +35,6 @@ func TestParsers_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/partnerstack/partnerstack_test.go b/pkg/detectors/partnerstack/partnerstack_test.go index aea076ae1cf9..8a7d93a7d161 100644 --- a/pkg/detectors/partnerstack/partnerstack_test.go +++ b/pkg/detectors/partnerstack/partnerstack_test.go @@ -35,11 +35,6 @@ func TestPartnerstack_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pastebin/pastebin_test.go b/pkg/detectors/pastebin/pastebin_test.go index 5c1006ef9225..749764344a11 100644 --- a/pkg/detectors/pastebin/pastebin_test.go +++ b/pkg/detectors/pastebin/pastebin_test.go @@ -35,11 +35,6 @@ func TestPastebin_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/paydirtapp/paydirtapp_test.go b/pkg/detectors/paydirtapp/paydirtapp_test.go index ef44c0e441ea..8aad20f538d3 100644 --- a/pkg/detectors/paydirtapp/paydirtapp_test.go +++ b/pkg/detectors/paydirtapp/paydirtapp_test.go @@ -34,12 +34,7 @@ func TestPaydirtyapp_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/paymoapp/paymoapp_test.go b/pkg/detectors/paymoapp/paymoapp_test.go index 6886a656f9cd..c106cee9b64c 100644 --- a/pkg/detectors/paymoapp/paymoapp_test.go +++ b/pkg/detectors/paymoapp/paymoapp_test.go @@ -34,12 +34,7 @@ func TestPaymoapp_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/paymongo/paymongo_test.go b/pkg/detectors/paymongo/paymongo_test.go index 864918d4dc43..c18c15360258 100644 --- a/pkg/detectors/paymongo/paymongo_test.go +++ b/pkg/detectors/paymongo/paymongo_test.go @@ -34,12 +34,7 @@ func TestPaymongo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pdflayer/pdflayer_test.go b/pkg/detectors/pdflayer/pdflayer_test.go index 7896435b16f6..ba5e19c5e764 100644 --- a/pkg/detectors/pdflayer/pdflayer_test.go +++ b/pkg/detectors/pdflayer/pdflayer_test.go @@ -34,12 +34,7 @@ func TestPdfLayer_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pdfshift/pdfshift_test.go b/pkg/detectors/pdfshift/pdfshift_test.go index f747d8d1b667..647c80b2eb14 100644 --- a/pkg/detectors/pdfshift/pdfshift_test.go +++ b/pkg/detectors/pdfshift/pdfshift_test.go @@ -35,11 +35,6 @@ func TestPdfShift_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/peopledatalabs/peopledatalabs_test.go b/pkg/detectors/peopledatalabs/peopledatalabs_test.go index 25523d477210..fc7b915e2ad2 100644 --- a/pkg/detectors/peopledatalabs/peopledatalabs_test.go +++ b/pkg/detectors/peopledatalabs/peopledatalabs_test.go @@ -35,11 +35,6 @@ func TestPeopleDataLabs_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pepipost/pepipost_test.go b/pkg/detectors/pepipost/pepipost_test.go index 0d27ee25b950..e5c4296ead80 100644 --- a/pkg/detectors/pepipost/pepipost_test.go +++ b/pkg/detectors/pepipost/pepipost_test.go @@ -34,12 +34,7 @@ func TestPepipost_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/percy/percy_test.go b/pkg/detectors/percy/percy_test.go index 8942cbedb923..83d75c27ee3f 100644 --- a/pkg/detectors/percy/percy_test.go +++ b/pkg/detectors/percy/percy_test.go @@ -34,12 +34,7 @@ func TestPercy_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = 'PERCY_TOKEN=%s' | 'PERCY_TOKEN=%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = 'PERCY_TOKEN=%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = 'PERCY_TOKEN=%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pipedream/pipedream_test.go b/pkg/detectors/pipedream/pipedream_test.go index d6eeab70d82f..dd09c8288c44 100644 --- a/pkg/detectors/pipedream/pipedream_test.go +++ b/pkg/detectors/pipedream/pipedream_test.go @@ -34,12 +34,7 @@ func TestPipedream_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pipedrive/pipedrive_test.go b/pkg/detectors/pipedrive/pipedrive_test.go index 25301e8c8891..e8ee04cf2b98 100644 --- a/pkg/detectors/pipedrive/pipedrive_test.go +++ b/pkg/detectors/pipedrive/pipedrive_test.go @@ -34,12 +34,7 @@ func TestPipedrive_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pivotaltracker/pivotaltracker_test.go b/pkg/detectors/pivotaltracker/pivotaltracker_test.go index 9962cd484456..05ff9f9411f1 100644 --- a/pkg/detectors/pivotaltracker/pivotaltracker_test.go +++ b/pkg/detectors/pivotaltracker/pivotaltracker_test.go @@ -35,11 +35,6 @@ func TestPivotalTracker_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pixabay/pixabay_test.go b/pkg/detectors/pixabay/pixabay_test.go index 72673940fa3c..50b03226f8e3 100644 --- a/pkg/detectors/pixabay/pixabay_test.go +++ b/pkg/detectors/pixabay/pixabay_test.go @@ -35,11 +35,6 @@ func TestPixabay_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/planyo/planyo_test.go b/pkg/detectors/planyo/planyo_test.go index dc0bfc3f38a0..4dcbc72029ac 100644 --- a/pkg/detectors/planyo/planyo_test.go +++ b/pkg/detectors/planyo/planyo_test.go @@ -35,11 +35,6 @@ func TestPlanyo_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/podio/podio_test.go b/pkg/detectors/podio/podio_test.go index d089c4c879f6..2cb6a60c3765 100644 --- a/pkg/detectors/podio/podio_test.go +++ b/pkg/detectors/podio/podio_test.go @@ -34,12 +34,7 @@ func TestPodio_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pollsapi/pollsapi_test.go b/pkg/detectors/pollsapi/pollsapi_test.go index 2c7dbdd20215..baa4e45bab68 100644 --- a/pkg/detectors/pollsapi/pollsapi_test.go +++ b/pkg/detectors/pollsapi/pollsapi_test.go @@ -35,11 +35,6 @@ func TestPollsAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/polygon/polygon_test.go b/pkg/detectors/polygon/polygon_test.go index dda41ae029a1..e67518a83132 100644 --- a/pkg/detectors/polygon/polygon_test.go +++ b/pkg/detectors/polygon/polygon_test.go @@ -34,12 +34,7 @@ func TestPolygon_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/positionstack/positionstack_test.go b/pkg/detectors/positionstack/positionstack_test.go index b7d6219c1a9d..fb46f04eef05 100644 --- a/pkg/detectors/positionstack/positionstack_test.go +++ b/pkg/detectors/positionstack/positionstack_test.go @@ -35,11 +35,6 @@ func TestPositionStack_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/postageapp/postageapp_test.go b/pkg/detectors/postageapp/postageapp_test.go index a3f7dc482430..8a5effb66900 100644 --- a/pkg/detectors/postageapp/postageapp_test.go +++ b/pkg/detectors/postageapp/postageapp_test.go @@ -34,12 +34,7 @@ func TestPostageApp_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/postbacks/postbacks_test.go b/pkg/detectors/postbacks/postbacks_test.go index d011b068e46e..75d13b698687 100644 --- a/pkg/detectors/postbacks/postbacks_test.go +++ b/pkg/detectors/postbacks/postbacks_test.go @@ -34,12 +34,7 @@ func TestPostbacks_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/postmark/postmark_test.go b/pkg/detectors/postmark/postmark_test.go index 8c0e4b6b7b0c..192d1d2c3a49 100644 --- a/pkg/detectors/postmark/postmark_test.go +++ b/pkg/detectors/postmark/postmark_test.go @@ -34,12 +34,7 @@ func TestPostmark_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/powrbot/powrbot_test.go b/pkg/detectors/powrbot/powrbot_test.go index 117a1efd0b8a..ae8a0276b18b 100644 --- a/pkg/detectors/powrbot/powrbot_test.go +++ b/pkg/detectors/powrbot/powrbot_test.go @@ -34,12 +34,7 @@ func TestPowrbot_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/privacy/privacy_test.go b/pkg/detectors/privacy/privacy_test.go index 540db09ca49a..2c607ad45341 100644 --- a/pkg/detectors/privacy/privacy_test.go +++ b/pkg/detectors/privacy/privacy_test.go @@ -34,12 +34,7 @@ func TestPrivacy_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/prodpad/prodpad_test.go b/pkg/detectors/prodpad/prodpad_test.go index 2e5deb8154ab..ffea7dd4b2db 100644 --- a/pkg/detectors/prodpad/prodpad_test.go +++ b/pkg/detectors/prodpad/prodpad_test.go @@ -34,12 +34,7 @@ func TestProdpad_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/prospectcrm/prospectcrm_test.go b/pkg/detectors/prospectcrm/prospectcrm_test.go index 86175b5afc81..afa575afbc64 100644 --- a/pkg/detectors/prospectcrm/prospectcrm_test.go +++ b/pkg/detectors/prospectcrm/prospectcrm_test.go @@ -35,11 +35,6 @@ func TestProspectCRM_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/protocolsio/protocolsio_test.go b/pkg/detectors/protocolsio/protocolsio_test.go index 66d7ae639bbf..914bbc5fea5c 100644 --- a/pkg/detectors/protocolsio/protocolsio_test.go +++ b/pkg/detectors/protocolsio/protocolsio_test.go @@ -35,11 +35,6 @@ func TestProtocolsIO_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/proxycrawl/proxycrawl_test.go b/pkg/detectors/proxycrawl/proxycrawl_test.go index 31faaa415063..0f29ff2933c0 100644 --- a/pkg/detectors/proxycrawl/proxycrawl_test.go +++ b/pkg/detectors/proxycrawl/proxycrawl_test.go @@ -35,11 +35,6 @@ func TestProxyCrawl_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/purestake/purestake_test.go b/pkg/detectors/purestake/purestake_test.go index 8d2e72cb73a4..c64d969bac3a 100644 --- a/pkg/detectors/purestake/purestake_test.go +++ b/pkg/detectors/purestake/purestake_test.go @@ -35,11 +35,6 @@ func TestPureStake_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey_test.go b/pkg/detectors/pushbulletapikey/pushbulletapikey_test.go index 645ccd65f722..1f83928b55d4 100644 --- a/pkg/detectors/pushbulletapikey/pushbulletapikey_test.go +++ b/pkg/detectors/pushbulletapikey/pushbulletapikey_test.go @@ -35,11 +35,6 @@ func TestPushBulletApiKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/qase/qase_test.go b/pkg/detectors/qase/qase_test.go index e2f89299c6e4..89b439f9deec 100644 --- a/pkg/detectors/qase/qase_test.go +++ b/pkg/detectors/qase/qase_test.go @@ -35,11 +35,6 @@ func TestQase_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/qualaroo/qualaroo_test.go b/pkg/detectors/qualaroo/qualaroo_test.go index 0942f1b148c0..0f31e88e0d83 100644 --- a/pkg/detectors/qualaroo/qualaroo_test.go +++ b/pkg/detectors/qualaroo/qualaroo_test.go @@ -34,12 +34,7 @@ func TestQualaroo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/qubole/qubole_test.go b/pkg/detectors/qubole/qubole_test.go index 804b49c34381..c48ae875c6d0 100644 --- a/pkg/detectors/qubole/qubole_test.go +++ b/pkg/detectors/qubole/qubole_test.go @@ -34,12 +34,7 @@ func TestQubole_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rapidapi/rapidapi_test.go b/pkg/detectors/rapidapi/rapidapi_test.go index 956821d36a9e..e51046570fdf 100644 --- a/pkg/detectors/rapidapi/rapidapi_test.go +++ b/pkg/detectors/rapidapi/rapidapi_test.go @@ -34,12 +34,7 @@ func TestRapidApi_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/raven/raven_test.go b/pkg/detectors/raven/raven_test.go index a2089db5afdb..ee81b5ed9936 100644 --- a/pkg/detectors/raven/raven_test.go +++ b/pkg/detectors/raven/raven_test.go @@ -34,12 +34,7 @@ func TestRaven_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rawg/rawg_test.go b/pkg/detectors/rawg/rawg_test.go index 986c50eee979..b5afbfce30a6 100644 --- a/pkg/detectors/rawg/rawg_test.go +++ b/pkg/detectors/rawg/rawg_test.go @@ -34,12 +34,7 @@ func TestRawg_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/reachmail/reachmail_test.go b/pkg/detectors/reachmail/reachmail_test.go index e18fd5561d8b..1df5bd9db95e 100644 --- a/pkg/detectors/reachmail/reachmail_test.go +++ b/pkg/detectors/reachmail/reachmail_test.go @@ -34,12 +34,7 @@ func TestReachmail_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rebrandly/rebrandly_test.go b/pkg/detectors/rebrandly/rebrandly_test.go index 5ac8e8ce512a..8c616654a594 100644 --- a/pkg/detectors/rebrandly/rebrandly_test.go +++ b/pkg/detectors/rebrandly/rebrandly_test.go @@ -35,11 +35,6 @@ func TestRebrandly_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/refiner/refiner_test.go b/pkg/detectors/refiner/refiner_test.go index fc1e9b41b3be..db91f34990a9 100644 --- a/pkg/detectors/refiner/refiner_test.go +++ b/pkg/detectors/refiner/refiner_test.go @@ -34,12 +34,7 @@ func TestRefiner_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rentman/rentman_test.go b/pkg/detectors/rentman/rentman_test.go index 1ae29bdeb775..95c4121c907b 100644 --- a/pkg/detectors/rentman/rentman_test.go +++ b/pkg/detectors/rentman/rentman_test.go @@ -34,12 +34,7 @@ func TestRentman_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/replyio/replyio_test.go b/pkg/detectors/replyio/replyio_test.go index d1411db91ab8..9331a0819777 100644 --- a/pkg/detectors/replyio/replyio_test.go +++ b/pkg/detectors/replyio/replyio_test.go @@ -35,11 +35,6 @@ func TestReplyio_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/requestfinance/requestfinance_test.go b/pkg/detectors/requestfinance/requestfinance_test.go index 4f0b3e044804..6c82d938a6e6 100644 --- a/pkg/detectors/requestfinance/requestfinance_test.go +++ b/pkg/detectors/requestfinance/requestfinance_test.go @@ -35,11 +35,6 @@ func TestRequestfinance_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/restpack/restpack_test.go b/pkg/detectors/restpack/restpack_test.go index e90b8c3667c7..e9f66dc2e6e2 100644 --- a/pkg/detectors/restpack/restpack_test.go +++ b/pkg/detectors/restpack/restpack_test.go @@ -34,12 +34,7 @@ func TestRestpack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_test.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_test.go index a8e3c4522724..cbba1cae6c87 100644 --- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_test.go +++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi_test.go @@ -35,11 +35,6 @@ func TestRestpackHtmlToPdfAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_test.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_test.go index 04fda6686fda..6f07c34e0d0a 100644 --- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_test.go +++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi_test.go @@ -35,11 +35,6 @@ func TestRestpackScreenshotAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ritekit/ritekit_test.go b/pkg/detectors/ritekit/ritekit_test.go index 438ac5ed9bea..de5934a5383c 100644 --- a/pkg/detectors/ritekit/ritekit_test.go +++ b/pkg/detectors/ritekit/ritekit_test.go @@ -34,12 +34,7 @@ func TestRiteKit_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rocketreach/rocketreach_test.go b/pkg/detectors/rocketreach/rocketreach_test.go index 330977e96bac..eaf806ae803b 100644 --- a/pkg/detectors/rocketreach/rocketreach_test.go +++ b/pkg/detectors/rocketreach/rocketreach_test.go @@ -34,12 +34,7 @@ func TestRocketReach_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/rockset/rockset_test.go b/pkg/detectors/rockset/rockset_test.go index 36e84755e0cc..0cc363d84bda 100644 --- a/pkg/detectors/rockset/rockset_test.go +++ b/pkg/detectors/rockset/rockset_test.go @@ -34,12 +34,7 @@ func TestRockset_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/route4me/route4me_test.go b/pkg/detectors/route4me/route4me_test.go index 24e8558fddfc..be91b38c1887 100644 --- a/pkg/detectors/route4me/route4me_test.go +++ b/pkg/detectors/route4me/route4me_test.go @@ -34,12 +34,7 @@ func TestRoute4me_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/salesblink/salesblink_test.go b/pkg/detectors/salesblink/salesblink_test.go index 0b2a161614a6..936030037a2b 100644 --- a/pkg/detectors/salesblink/salesblink_test.go +++ b/pkg/detectors/salesblink/salesblink_test.go @@ -34,12 +34,7 @@ func TestSalesblink_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/salescookie/salescookie_test.go b/pkg/detectors/salescookie/salescookie_test.go index 70c81a2c2f77..77aae8fa8265 100644 --- a/pkg/detectors/salescookie/salescookie_test.go +++ b/pkg/detectors/salescookie/salescookie_test.go @@ -35,11 +35,6 @@ func TestSalescookie_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/salesflare/salesflare_test.go b/pkg/detectors/salesflare/salesflare_test.go index e70397b90a11..67a9f810b145 100644 --- a/pkg/detectors/salesflare/salesflare_test.go +++ b/pkg/detectors/salesflare/salesflare_test.go @@ -34,12 +34,7 @@ func TestSalesflare_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scalewaykey/scalewaykey_test.go b/pkg/detectors/scalewaykey/scalewaykey_test.go index 5b4f37481d3c..8eea139af306 100644 --- a/pkg/detectors/scalewaykey/scalewaykey_test.go +++ b/pkg/detectors/scalewaykey/scalewaykey_test.go @@ -34,12 +34,7 @@ func TestScalewayKey_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrapeowl/scrapeowl_test.go b/pkg/detectors/scrapeowl/scrapeowl_test.go index 1d05ef18f69c..d10cad729d0e 100644 --- a/pkg/detectors/scrapeowl/scrapeowl_test.go +++ b/pkg/detectors/scrapeowl/scrapeowl_test.go @@ -34,12 +34,7 @@ func TestScrapeowl_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scraperapi/scraperapi_test.go b/pkg/detectors/scraperapi/scraperapi_test.go index 100c82acab60..b37d0a727e4e 100644 --- a/pkg/detectors/scraperapi/scraperapi_test.go +++ b/pkg/detectors/scraperapi/scraperapi_test.go @@ -34,12 +34,7 @@ func TestScraperAPI_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scraperbox/scraperbox_test.go b/pkg/detectors/scraperbox/scraperbox_test.go index ef7c06dfd5b1..29cbd7939996 100644 --- a/pkg/detectors/scraperbox/scraperbox_test.go +++ b/pkg/detectors/scraperbox/scraperbox_test.go @@ -34,12 +34,7 @@ func TestScraperBox_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrapestack/scrapestack_test.go b/pkg/detectors/scrapestack/scrapestack_test.go index a46fa6c9c5d3..ca5fd6871351 100644 --- a/pkg/detectors/scrapestack/scrapestack_test.go +++ b/pkg/detectors/scrapestack/scrapestack_test.go @@ -34,12 +34,7 @@ func TestScrapeStack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrapfly/scrapfly_test.go b/pkg/detectors/scrapfly/scrapfly_test.go index 71a844edcb53..c585088af8eb 100644 --- a/pkg/detectors/scrapfly/scrapfly_test.go +++ b/pkg/detectors/scrapfly/scrapfly_test.go @@ -34,12 +34,7 @@ func TestScrapfly_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrapingant/scrapingant_test.go b/pkg/detectors/scrapingant/scrapingant_test.go index dcce62fe9ccb..00342195db26 100644 --- a/pkg/detectors/scrapingant/scrapingant_test.go +++ b/pkg/detectors/scrapingant/scrapingant_test.go @@ -35,11 +35,6 @@ func TestScrapingAnt_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrapingbee/scrapingbee_test.go b/pkg/detectors/scrapingbee/scrapingbee_test.go index 24061f0a463d..b29cce36be35 100644 --- a/pkg/detectors/scrapingbee/scrapingbee_test.go +++ b/pkg/detectors/scrapingbee/scrapingbee_test.go @@ -35,11 +35,6 @@ func TestScrapingBee_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/screenshotapi/screenshotapi_test.go b/pkg/detectors/screenshotapi/screenshotapi_test.go index 2c028fdd5ebf..3ffa57f889f1 100644 --- a/pkg/detectors/screenshotapi/screenshotapi_test.go +++ b/pkg/detectors/screenshotapi/screenshotapi_test.go @@ -35,11 +35,6 @@ func TestScreenshotAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/screenshotlayer/screenshotlayer_test.go b/pkg/detectors/screenshotlayer/screenshotlayer_test.go index 7f7538bbc9a4..c028250a68e9 100644 --- a/pkg/detectors/screenshotlayer/screenshotlayer_test.go +++ b/pkg/detectors/screenshotlayer/screenshotlayer_test.go @@ -35,11 +35,6 @@ func TestScreenshotLayer_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/scrutinizerci/scrutinizerci_test.go b/pkg/detectors/scrutinizerci/scrutinizerci_test.go index e4798ea40798..ce6f9ef76412 100644 --- a/pkg/detectors/scrutinizerci/scrutinizerci_test.go +++ b/pkg/detectors/scrutinizerci/scrutinizerci_test.go @@ -35,11 +35,6 @@ func TestScrutinizerCi_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/securitytrails/securitytrails_test.go b/pkg/detectors/securitytrails/securitytrails_test.go index 83dd8f0a18ae..4f73dd019c78 100644 --- a/pkg/detectors/securitytrails/securitytrails_test.go +++ b/pkg/detectors/securitytrails/securitytrails_test.go @@ -35,11 +35,6 @@ func TestSecurityTrails_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/segmentapikey/segmentapikey_test.go b/pkg/detectors/segmentapikey/segmentapikey_test.go index 9344a12b2fc2..21f600ec036d 100644 --- a/pkg/detectors/segmentapikey/segmentapikey_test.go +++ b/pkg/detectors/segmentapikey/segmentapikey_test.go @@ -35,11 +35,6 @@ func TestSegmentApiKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/selectpdf/selectpdf_test.go b/pkg/detectors/selectpdf/selectpdf_test.go index 9da69e3dd8c7..9020d86c0592 100644 --- a/pkg/detectors/selectpdf/selectpdf_test.go +++ b/pkg/detectors/selectpdf/selectpdf_test.go @@ -34,12 +34,7 @@ func TestSelectPDF_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/semaphore/semaphore_test.go b/pkg/detectors/semaphore/semaphore_test.go index 60b73d46e433..6ce7a6df6a2e 100644 --- a/pkg/detectors/semaphore/semaphore_test.go +++ b/pkg/detectors/semaphore/semaphore_test.go @@ -34,12 +34,7 @@ func TestSemaphore_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_test.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_test.go index aa3d17e1649f..e3fb0154b6a1 100644 --- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_test.go +++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi_test.go @@ -35,11 +35,6 @@ func TestSendbirdOrganizationAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sentrytoken/sentrytoken_test.go b/pkg/detectors/sentrytoken/sentrytoken_test.go index 8c7806ff43e0..bce2f30c1ed8 100644 --- a/pkg/detectors/sentrytoken/sentrytoken_test.go +++ b/pkg/detectors/sentrytoken/sentrytoken_test.go @@ -34,12 +34,7 @@ func TestSentryToken_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/serphouse/serphouse_test.go b/pkg/detectors/serphouse/serphouse_test.go index 48e1cfd4188c..887463226c98 100644 --- a/pkg/detectors/serphouse/serphouse_test.go +++ b/pkg/detectors/serphouse/serphouse_test.go @@ -34,12 +34,7 @@ func TestSerphouse_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/serpstack/serpstack_test.go b/pkg/detectors/serpstack/serpstack_test.go index d2b07e7cb0f5..01b0cd5c4abd 100644 --- a/pkg/detectors/serpstack/serpstack_test.go +++ b/pkg/detectors/serpstack/serpstack_test.go @@ -34,12 +34,7 @@ func TestSerpStack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sherpadesk/sherpadesk_test.go b/pkg/detectors/sherpadesk/sherpadesk_test.go index a9f63c4e01af..212db4a47127 100644 --- a/pkg/detectors/sherpadesk/sherpadesk_test.go +++ b/pkg/detectors/sherpadesk/sherpadesk_test.go @@ -34,12 +34,7 @@ func TestSherpadesk_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/shipday/shipday_test.go b/pkg/detectors/shipday/shipday_test.go index 2dfc61115198..ee45fde96daa 100644 --- a/pkg/detectors/shipday/shipday_test.go +++ b/pkg/detectors/shipday/shipday_test.go @@ -34,12 +34,7 @@ func TestShipday_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/shodankey/shodankey_test.go b/pkg/detectors/shodankey/shodankey_test.go index c6ffa649743a..a47d36a26911 100644 --- a/pkg/detectors/shodankey/shodankey_test.go +++ b/pkg/detectors/shodankey/shodankey_test.go @@ -34,12 +34,7 @@ func TestShodanKey_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/shortcut/shortcut_test.go b/pkg/detectors/shortcut/shortcut_test.go index 567872fd54d1..103a8be69959 100644 --- a/pkg/detectors/shortcut/shortcut_test.go +++ b/pkg/detectors/shortcut/shortcut_test.go @@ -34,12 +34,7 @@ func TestShortcut_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/shotstack/shotstack_test.go b/pkg/detectors/shotstack/shotstack_test.go index a4060c58a0b5..6309eab245ac 100644 --- a/pkg/detectors/shotstack/shotstack_test.go +++ b/pkg/detectors/shotstack/shotstack_test.go @@ -34,12 +34,7 @@ func TestShotstack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth_test.go b/pkg/detectors/shutterstockoauth/shutterstockoauth_test.go index a79ce7979776..057e34a6e7a1 100644 --- a/pkg/detectors/shutterstockoauth/shutterstockoauth_test.go +++ b/pkg/detectors/shutterstockoauth/shutterstockoauth_test.go @@ -35,11 +35,6 @@ func TestShutterstockOAuth_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/signaturit/signaturit_test.go b/pkg/detectors/signaturit/signaturit_test.go index 2175d80af6c5..2920ba027dff 100644 --- a/pkg/detectors/signaturit/signaturit_test.go +++ b/pkg/detectors/signaturit/signaturit_test.go @@ -34,12 +34,7 @@ func TestSignaturit_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/signupgenius/signupgenius_test.go b/pkg/detectors/signupgenius/signupgenius_test.go index eacba7d8e042..75db0fd9a372 100644 --- a/pkg/detectors/signupgenius/signupgenius_test.go +++ b/pkg/detectors/signupgenius/signupgenius_test.go @@ -35,11 +35,6 @@ func TestSignupgenius_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sigopt/sigopt_test.go b/pkg/detectors/sigopt/sigopt_test.go index a0053185fc93..99a5a82ac76c 100644 --- a/pkg/detectors/sigopt/sigopt_test.go +++ b/pkg/detectors/sigopt/sigopt_test.go @@ -34,12 +34,7 @@ func TestSigopt_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/simfin/simfin_test.go b/pkg/detectors/simfin/simfin_test.go index 66972104b3cd..409e786f862e 100644 --- a/pkg/detectors/simfin/simfin_test.go +++ b/pkg/detectors/simfin/simfin_test.go @@ -34,12 +34,7 @@ func TestSimFin_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/simplesat/simplesat_test.go b/pkg/detectors/simplesat/simplesat_test.go index 89f4291d9931..1eabb3fba400 100644 --- a/pkg/detectors/simplesat/simplesat_test.go +++ b/pkg/detectors/simplesat/simplesat_test.go @@ -34,12 +34,7 @@ func TestSimplesat_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/simplynoted/simplynoted_test.go b/pkg/detectors/simplynoted/simplynoted_test.go index 0e7f3087f72f..2b741c6c8050 100644 --- a/pkg/detectors/simplynoted/simplynoted_test.go +++ b/pkg/detectors/simplynoted/simplynoted_test.go @@ -35,11 +35,6 @@ func TestSimplyNoted_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/simvoly/simvoly_test.go b/pkg/detectors/simvoly/simvoly_test.go index fc10692dc409..4057dcc481bd 100644 --- a/pkg/detectors/simvoly/simvoly_test.go +++ b/pkg/detectors/simvoly/simvoly_test.go @@ -34,12 +34,7 @@ func TestSimvoly_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/skrappio/skrappio_test.go b/pkg/detectors/skrappio/skrappio_test.go index ee8222cfd1f7..5bab02899de8 100644 --- a/pkg/detectors/skrappio/skrappio_test.go +++ b/pkg/detectors/skrappio/skrappio_test.go @@ -35,11 +35,6 @@ func TestSkrapio_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/smartsheets/smartsheets_test.go b/pkg/detectors/smartsheets/smartsheets_test.go index a388b73049af..db6c1da55545 100644 --- a/pkg/detectors/smartsheets/smartsheets_test.go +++ b/pkg/detectors/smartsheets/smartsheets_test.go @@ -34,12 +34,7 @@ func TestSmartsheets_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/snipcart/snipcart_test.go b/pkg/detectors/snipcart/snipcart_test.go index a8a754fb8a71..0e318cdeadd1 100644 --- a/pkg/detectors/snipcart/snipcart_test.go +++ b/pkg/detectors/snipcart/snipcart_test.go @@ -35,11 +35,6 @@ func TestSnipcart_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sonarcloud/sonarcloud_test.go b/pkg/detectors/sonarcloud/sonarcloud_test.go index 142b34352d94..1ea4df0233f1 100644 --- a/pkg/detectors/sonarcloud/sonarcloud_test.go +++ b/pkg/detectors/sonarcloud/sonarcloud_test.go @@ -35,11 +35,6 @@ func TestSonarCloud_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/speechtextai/speechtextai_test.go b/pkg/detectors/speechtextai/speechtextai_test.go index 6c1ef9183322..4314579538e1 100644 --- a/pkg/detectors/speechtextai/speechtextai_test.go +++ b/pkg/detectors/speechtextai/speechtextai_test.go @@ -35,11 +35,6 @@ func TestSpeechTextAI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_test.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_test.go index 9cf7298d16be..49f86d828bbd 100644 --- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_test.go +++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken_test.go @@ -35,11 +35,6 @@ func TestSplunkObservabilityToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/spoonacular/spoonacular_test.go b/pkg/detectors/spoonacular/spoonacular_test.go index d8d5e323bee1..001b7edbab06 100644 --- a/pkg/detectors/spoonacular/spoonacular_test.go +++ b/pkg/detectors/spoonacular/spoonacular_test.go @@ -35,11 +35,6 @@ func TestSpoonacular_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sportsmonk/sportsmonk_test.go b/pkg/detectors/sportsmonk/sportsmonk_test.go index 4bf2390e4659..298513538a63 100644 --- a/pkg/detectors/sportsmonk/sportsmonk_test.go +++ b/pkg/detectors/sportsmonk/sportsmonk_test.go @@ -34,12 +34,7 @@ func TestSportsmonk_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/square/square_test.go b/pkg/detectors/square/square_test.go index dadda930f3ea..4eb32c18c7d7 100644 --- a/pkg/detectors/square/square_test.go +++ b/pkg/detectors/square/square_test.go @@ -34,12 +34,7 @@ func TestSquare_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/squarespace/squarespace_test.go b/pkg/detectors/squarespace/squarespace_test.go index ff66e179ae1b..652f392632e1 100644 --- a/pkg/detectors/squarespace/squarespace_test.go +++ b/pkg/detectors/squarespace/squarespace_test.go @@ -34,12 +34,7 @@ func TestSquarespace_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/sslmate/sslmate_test.go b/pkg/detectors/sslmate/sslmate_test.go index ee9cf6e14a36..c05dd7c0d5a6 100644 --- a/pkg/detectors/sslmate/sslmate_test.go +++ b/pkg/detectors/sslmate/sslmate_test.go @@ -35,11 +35,6 @@ func TestSslMate_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/statuscake/statuscake_test.go b/pkg/detectors/statuscake/statuscake_test.go index 041ae4efe70f..cae82a707984 100644 --- a/pkg/detectors/statuscake/statuscake_test.go +++ b/pkg/detectors/statuscake/statuscake_test.go @@ -34,12 +34,7 @@ func TestStatuscake_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/statuspage/statuspage_test.go b/pkg/detectors/statuspage/statuspage_test.go index 197ea035d41f..4d9edb84339f 100644 --- a/pkg/detectors/statuspage/statuspage_test.go +++ b/pkg/detectors/statuspage/statuspage_test.go @@ -34,12 +34,7 @@ func TestStatuspage_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/statuspal/statuspal_test.go b/pkg/detectors/statuspal/statuspal_test.go index 10fcfee9aabf..77ac33c78516 100644 --- a/pkg/detectors/statuspal/statuspal_test.go +++ b/pkg/detectors/statuspal/statuspal_test.go @@ -34,12 +34,7 @@ func TestStatuspal_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/stitchdata/stitchdata_test.go b/pkg/detectors/stitchdata/stitchdata_test.go index fc3d40cd0c5c..9d08de8455da 100644 --- a/pkg/detectors/stitchdata/stitchdata_test.go +++ b/pkg/detectors/stitchdata/stitchdata_test.go @@ -34,12 +34,7 @@ func TestStitchdata_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/stockdata/stockdata_test.go b/pkg/detectors/stockdata/stockdata_test.go index 04bb01feffc8..9166fcb8e560 100644 --- a/pkg/detectors/stockdata/stockdata_test.go +++ b/pkg/detectors/stockdata/stockdata_test.go @@ -35,11 +35,6 @@ func TestStockdata_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/storecove/storecove_test.go b/pkg/detectors/storecove/storecove_test.go index 7fbabecd9eeb..010b75924895 100644 --- a/pkg/detectors/storecove/storecove_test.go +++ b/pkg/detectors/storecove/storecove_test.go @@ -35,11 +35,6 @@ func TestStorecove_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/stormboard/stormboard_test.go b/pkg/detectors/stormboard/stormboard_test.go index ecc3d0fc6a09..5d82ead4b41b 100644 --- a/pkg/detectors/stormboard/stormboard_test.go +++ b/pkg/detectors/stormboard/stormboard_test.go @@ -35,11 +35,6 @@ func TestStormboard_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/stormglass/stormglass_test.go b/pkg/detectors/stormglass/stormglass_test.go index 26198eee3e8d..6aeb43d54522 100644 --- a/pkg/detectors/stormglass/stormglass_test.go +++ b/pkg/detectors/stormglass/stormglass_test.go @@ -34,12 +34,7 @@ func TestStormglass_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/storyblok/storyblok_test.go b/pkg/detectors/storyblok/storyblok_test.go index 3afcca6b3f3e..60104ac76daa 100644 --- a/pkg/detectors/storyblok/storyblok_test.go +++ b/pkg/detectors/storyblok/storyblok_test.go @@ -35,11 +35,6 @@ func TestStoryblok_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/storychief/storychief_test.go b/pkg/detectors/storychief/storychief_test.go index a03e5c203033..146ed9dfd0b3 100644 --- a/pkg/detectors/storychief/storychief_test.go +++ b/pkg/detectors/storychief/storychief_test.go @@ -34,12 +34,7 @@ func TestStorychief_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/streak/streak_test.go b/pkg/detectors/streak/streak_test.go index ea1ffeff476a..4f08d5e191eb 100644 --- a/pkg/detectors/streak/streak_test.go +++ b/pkg/detectors/streak/streak_test.go @@ -35,11 +35,6 @@ func TestStreak_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/stripo/stripo_test.go b/pkg/detectors/stripo/stripo_test.go index fd66f01bddb3..061caf69abc0 100644 --- a/pkg/detectors/stripo/stripo_test.go +++ b/pkg/detectors/stripo/stripo_test.go @@ -34,12 +34,7 @@ func TestStripo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/supernotesapi/supernotesapi_test.go b/pkg/detectors/supernotesapi/supernotesapi_test.go index 43e926d9ad79..e730d285b39d 100644 --- a/pkg/detectors/supernotesapi/supernotesapi_test.go +++ b/pkg/detectors/supernotesapi/supernotesapi_test.go @@ -35,11 +35,6 @@ func TestSuperNotesAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = ' %s ' | ' %s '", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = ' %s '", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = ' %s '", keyword, invalidPattern), diff --git a/pkg/detectors/surveybot/surveybot_test.go b/pkg/detectors/surveybot/surveybot_test.go index c8210aca3e97..54d66c60b201 100644 --- a/pkg/detectors/surveybot/surveybot_test.go +++ b/pkg/detectors/surveybot/surveybot_test.go @@ -34,12 +34,7 @@ func TestSurveyBot_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/surveysparrow/surveysparrow_test.go b/pkg/detectors/surveysparrow/surveysparrow_test.go index c82d88b031ee..748270842b88 100644 --- a/pkg/detectors/surveysparrow/surveysparrow_test.go +++ b/pkg/detectors/surveysparrow/surveysparrow_test.go @@ -35,11 +35,6 @@ func TestSurveySparrow_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/survicate/survicate_test.go b/pkg/detectors/survicate/survicate_test.go index f4e2c9370d21..c686e8d1f9cf 100644 --- a/pkg/detectors/survicate/survicate_test.go +++ b/pkg/detectors/survicate/survicate_test.go @@ -35,11 +35,6 @@ func TestSurvicate_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/swiftype/swiftype_test.go b/pkg/detectors/swiftype/swiftype_test.go index 3715353e8de6..deb54b9c503e 100644 --- a/pkg/detectors/swiftype/swiftype_test.go +++ b/pkg/detectors/swiftype/swiftype_test.go @@ -35,11 +35,6 @@ func TestSwiftype_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tallyfy/tallyfy_test.go b/pkg/detectors/tallyfy/tallyfy_test.go index 3065da9edb25..f843be25d7ef 100644 --- a/pkg/detectors/tallyfy/tallyfy_test.go +++ b/pkg/detectors/tallyfy/tallyfy_test.go @@ -34,12 +34,7 @@ func TestTallyfy_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tatumio/tatumio_test.go b/pkg/detectors/tatumio/tatumio_test.go index 926c8fe4663b..dd33fa67df30 100644 --- a/pkg/detectors/tatumio/tatumio_test.go +++ b/pkg/detectors/tatumio/tatumio_test.go @@ -35,11 +35,6 @@ func TestTatumIO_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/taxjar/taxjar_test.go b/pkg/detectors/taxjar/taxjar_test.go index efd34e121562..0a7750c46425 100644 --- a/pkg/detectors/taxjar/taxjar_test.go +++ b/pkg/detectors/taxjar/taxjar_test.go @@ -34,12 +34,7 @@ func TestTaxjar_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/teamworkcrm/teamworkcrm_test.go b/pkg/detectors/teamworkcrm/teamworkcrm_test.go index a0c3db8f547c..0818e868fb29 100644 --- a/pkg/detectors/teamworkcrm/teamworkcrm_test.go +++ b/pkg/detectors/teamworkcrm/teamworkcrm_test.go @@ -35,11 +35,6 @@ func TestTeamworkCRM_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s ' | '%s '", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s '", keyword, invalidPattern), diff --git a/pkg/detectors/teamworkdesk/teamworkdesk_test.go b/pkg/detectors/teamworkdesk/teamworkdesk_test.go index 1c49df320f22..b589ea9d8fc5 100644 --- a/pkg/detectors/teamworkdesk/teamworkdesk_test.go +++ b/pkg/detectors/teamworkdesk/teamworkdesk_test.go @@ -35,11 +35,6 @@ func TestTeamworkDesk_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s ' | '%s '", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s '", keyword, invalidPattern), diff --git a/pkg/detectors/teamworkspaces/teamworkspaces_test.go b/pkg/detectors/teamworkspaces/teamworkspaces_test.go index 14b226d69a93..fe35fc696b96 100644 --- a/pkg/detectors/teamworkspaces/teamworkspaces_test.go +++ b/pkg/detectors/teamworkspaces/teamworkspaces_test.go @@ -35,11 +35,6 @@ func TestTeamworkSpaces_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s ' | '%s '", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s '", keyword, invalidPattern), diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi_test.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi_test.go index 52fab107c428..572202fdac55 100644 --- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi_test.go +++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi_test.go @@ -35,11 +35,6 @@ func TestTechnicalAnalysisApi_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tefter/tefter_test.go b/pkg/detectors/tefter/tefter_test.go index f3af28633856..390c944731f8 100644 --- a/pkg/detectors/tefter/tefter_test.go +++ b/pkg/detectors/tefter/tefter_test.go @@ -34,12 +34,7 @@ func TestTefter_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/telegrambottoken/telegrambottoken_test.go b/pkg/detectors/telegrambottoken/telegrambottoken_test.go index d500a0d5ed61..07acd0f5af50 100644 --- a/pkg/detectors/telegrambottoken/telegrambottoken_test.go +++ b/pkg/detectors/telegrambottoken/telegrambottoken_test.go @@ -35,11 +35,6 @@ func TestTelegramBotToken_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/teletype/teletype_test.go b/pkg/detectors/teletype/teletype_test.go index bc0f26d26e68..589610f52690 100644 --- a/pkg/detectors/teletype/teletype_test.go +++ b/pkg/detectors/teletype/teletype_test.go @@ -34,12 +34,7 @@ func TestTeletype_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/telnyx/telnyx_test.go b/pkg/detectors/telnyx/telnyx_test.go index 688d90243c83..ac8bd8554f3f 100644 --- a/pkg/detectors/telnyx/telnyx_test.go +++ b/pkg/detectors/telnyx/telnyx_test.go @@ -34,12 +34,7 @@ func TestTelnyx_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/theoddsapi/theoddsapi_test.go b/pkg/detectors/theoddsapi/theoddsapi_test.go index 28257655371b..dc91133e5f91 100644 --- a/pkg/detectors/theoddsapi/theoddsapi_test.go +++ b/pkg/detectors/theoddsapi/theoddsapi_test.go @@ -34,12 +34,7 @@ func TestTheOddsApi_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/ticketmaster/ticketmaster_test.go b/pkg/detectors/ticketmaster/ticketmaster_test.go index 0458e155a078..8cd5794d1707 100644 --- a/pkg/detectors/ticketmaster/ticketmaster_test.go +++ b/pkg/detectors/ticketmaster/ticketmaster_test.go @@ -35,11 +35,6 @@ func TestTicketMaster_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tickettailor/tickettailor_test.go b/pkg/detectors/tickettailor/tickettailor_test.go index 88913652daa9..db45901a3358 100644 --- a/pkg/detectors/tickettailor/tickettailor_test.go +++ b/pkg/detectors/tickettailor/tickettailor_test.go @@ -35,11 +35,6 @@ func TestTickettailor_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tiingo/tiingo_test.go b/pkg/detectors/tiingo/tiingo_test.go index 51dd57559365..32139660fba7 100644 --- a/pkg/detectors/tiingo/tiingo_test.go +++ b/pkg/detectors/tiingo/tiingo_test.go @@ -35,11 +35,6 @@ func TestTiingo_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/timecamp/timecamp_test.go b/pkg/detectors/timecamp/timecamp_test.go index 563037265874..34da4a2ea8a9 100644 --- a/pkg/detectors/timecamp/timecamp_test.go +++ b/pkg/detectors/timecamp/timecamp_test.go @@ -34,12 +34,7 @@ func TestTimeCamp_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/timezoneapi/timezoneapi_test.go b/pkg/detectors/timezoneapi/timezoneapi_test.go index 09993a459952..a0034cf0676b 100644 --- a/pkg/detectors/timezoneapi/timezoneapi_test.go +++ b/pkg/detectors/timezoneapi/timezoneapi_test.go @@ -35,11 +35,6 @@ func TestTimezoneapi_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tly/tly_test.go b/pkg/detectors/tly/tly_test.go index 8723aad29ba6..9cd2d1eff4cf 100644 --- a/pkg/detectors/tly/tly_test.go +++ b/pkg/detectors/tly/tly_test.go @@ -35,11 +35,6 @@ func TestTLy_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tmetric/tmetric_test.go b/pkg/detectors/tmetric/tmetric_test.go index becf3cbce4e0..004d9835f639 100644 --- a/pkg/detectors/tmetric/tmetric_test.go +++ b/pkg/detectors/tmetric/tmetric_test.go @@ -34,12 +34,7 @@ func TestTmetric_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/todoist/todoist_test.go b/pkg/detectors/todoist/todoist_test.go index 907b32203775..b61f4f7b497a 100644 --- a/pkg/detectors/todoist/todoist_test.go +++ b/pkg/detectors/todoist/todoist_test.go @@ -35,11 +35,6 @@ func TestTodoist_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/toggltrack/toggltrack_test.go b/pkg/detectors/toggltrack/toggltrack_test.go index 9725da4a71b8..90efe33be641 100644 --- a/pkg/detectors/toggltrack/toggltrack_test.go +++ b/pkg/detectors/toggltrack/toggltrack_test.go @@ -35,11 +35,6 @@ func TestTogglTrack_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tomorrowio/tomorrowio_test.go b/pkg/detectors/tomorrowio/tomorrowio_test.go index 6e5a0092ef75..45888add147a 100644 --- a/pkg/detectors/tomorrowio/tomorrowio_test.go +++ b/pkg/detectors/tomorrowio/tomorrowio_test.go @@ -35,11 +35,6 @@ func TestTomorrowIO_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tomtom/tomtom_test.go b/pkg/detectors/tomtom/tomtom_test.go index 262509262332..69d97f2e9250 100644 --- a/pkg/detectors/tomtom/tomtom_test.go +++ b/pkg/detectors/tomtom/tomtom_test.go @@ -35,11 +35,6 @@ func TestTomtom_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tradier/tradier_test.go b/pkg/detectors/tradier/tradier_test.go index e1331147ef6d..5beb9e7a1cd3 100644 --- a/pkg/detectors/tradier/tradier_test.go +++ b/pkg/detectors/tradier/tradier_test.go @@ -34,12 +34,7 @@ func TestTradier_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/transferwise/transferwise_test.go b/pkg/detectors/transferwise/transferwise_test.go index a7681225ebf6..18217f56a2ab 100644 --- a/pkg/detectors/transferwise/transferwise_test.go +++ b/pkg/detectors/transferwise/transferwise_test.go @@ -35,11 +35,6 @@ func TestTransferwise_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/travelpayouts/travelpayouts_test.go b/pkg/detectors/travelpayouts/travelpayouts_test.go index 871ffdb8d99e..3792ce6eecde 100644 --- a/pkg/detectors/travelpayouts/travelpayouts_test.go +++ b/pkg/detectors/travelpayouts/travelpayouts_test.go @@ -35,11 +35,6 @@ func TestTravelPayouts_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/travisci/travisci_test.go b/pkg/detectors/travisci/travisci_test.go index 1c140576904b..b7941ab4eb02 100644 --- a/pkg/detectors/travisci/travisci_test.go +++ b/pkg/detectors/travisci/travisci_test.go @@ -34,12 +34,7 @@ func TestTravisCI_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/twelvedata/twelvedata_test.go b/pkg/detectors/twelvedata/twelvedata_test.go index 32479732b097..b055124e85da 100644 --- a/pkg/detectors/twelvedata/twelvedata_test.go +++ b/pkg/detectors/twelvedata/twelvedata_test.go @@ -34,12 +34,7 @@ func TestTwelveData_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/twist/twist_test.go b/pkg/detectors/twist/twist_test.go index d09c71ded091..836214c99c90 100644 --- a/pkg/detectors/twist/twist_test.go +++ b/pkg/detectors/twist/twist_test.go @@ -35,12 +35,7 @@ func TestTwist_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s%s' | '%s%s'", keyword, prefix, validPattern, prefix, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s%s'", keyword, prefix, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s%s'", keyword, prefix, invalidPattern), diff --git a/pkg/detectors/twitter/v1/twitter_v1_test.go b/pkg/detectors/twitter/v1/twitter_v1_test.go index 4facd32740d1..3a4348098796 100644 --- a/pkg/detectors/twitter/v1/twitter_v1_test.go +++ b/pkg/detectors/twitter/v1/twitter_v1_test.go @@ -35,11 +35,6 @@ func TestTwitter_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/twitter/v2/twitter_v2_test.go b/pkg/detectors/twitter/v2/twitter_v2_test.go index 64072786932e..d58b476f7780 100644 --- a/pkg/detectors/twitter/v2/twitter_v2_test.go +++ b/pkg/detectors/twitter/v2/twitter_v2_test.go @@ -35,11 +35,6 @@ func TestTwitter_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/tyntec/tyntec_test.go b/pkg/detectors/tyntec/tyntec_test.go index 152358885bf2..aa0cc65fd7ca 100644 --- a/pkg/detectors/tyntec/tyntec_test.go +++ b/pkg/detectors/tyntec/tyntec_test.go @@ -35,11 +35,6 @@ func TestTyntec_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/typeform/v1/typeform_test.go b/pkg/detectors/typeform/v1/typeform_test.go index c22c753ff032..d1e8172cee03 100644 --- a/pkg/detectors/typeform/v1/typeform_test.go +++ b/pkg/detectors/typeform/v1/typeform_test.go @@ -35,11 +35,6 @@ func TestTypeform_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/uclassify/uclassify_test.go b/pkg/detectors/uclassify/uclassify_test.go index e5ef3bc8732e..2d1863f1b6e3 100644 --- a/pkg/detectors/uclassify/uclassify_test.go +++ b/pkg/detectors/uclassify/uclassify_test.go @@ -35,11 +35,6 @@ func TestUclassify_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/unifyid/unifyid_test.go b/pkg/detectors/unifyid/unifyid_test.go index 3d114f1217d1..fccc827ccf34 100644 --- a/pkg/detectors/unifyid/unifyid_test.go +++ b/pkg/detectors/unifyid/unifyid_test.go @@ -34,12 +34,7 @@ func TestUnifyid_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/unplugg/unplugg_test.go b/pkg/detectors/unplugg/unplugg_test.go index 3b5e7d2e729f..b19bcf5d2583 100644 --- a/pkg/detectors/unplugg/unplugg_test.go +++ b/pkg/detectors/unplugg/unplugg_test.go @@ -34,12 +34,7 @@ func TestUnplugg_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/unsplash/unsplash_test.go b/pkg/detectors/unsplash/unsplash_test.go index eea0e86e0ab9..e73f74bbc696 100644 --- a/pkg/detectors/unsplash/unsplash_test.go +++ b/pkg/detectors/unsplash/unsplash_test.go @@ -35,11 +35,6 @@ func TestUnsplash_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/upcdatabase/upcdatabase_test.go b/pkg/detectors/upcdatabase/upcdatabase_test.go index 73b3efe767d1..59ae9fbb3343 100644 --- a/pkg/detectors/upcdatabase/upcdatabase_test.go +++ b/pkg/detectors/upcdatabase/upcdatabase_test.go @@ -35,11 +35,6 @@ func TestUPCDatabase_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/uplead/uplead_test.go b/pkg/detectors/uplead/uplead_test.go index 7d4b0bef47b8..9d4ef297c709 100644 --- a/pkg/detectors/uplead/uplead_test.go +++ b/pkg/detectors/uplead/uplead_test.go @@ -34,12 +34,7 @@ func TestUplead_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/uptimerobot/uptimerobot_test.go b/pkg/detectors/uptimerobot/uptimerobot_test.go index 1b1ae7226f88..82be5166d87d 100644 --- a/pkg/detectors/uptimerobot/uptimerobot_test.go +++ b/pkg/detectors/uptimerobot/uptimerobot_test.go @@ -35,11 +35,6 @@ func TestUptimeRobot_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/upwave/upwave_test.go b/pkg/detectors/upwave/upwave_test.go index 6f6ed04a0824..f52167944096 100644 --- a/pkg/detectors/upwave/upwave_test.go +++ b/pkg/detectors/upwave/upwave_test.go @@ -34,12 +34,7 @@ func TestUpwave_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/urlscan/urlscan_test.go b/pkg/detectors/urlscan/urlscan_test.go index d5d22eec7924..56f98cf23c81 100644 --- a/pkg/detectors/urlscan/urlscan_test.go +++ b/pkg/detectors/urlscan/urlscan_test.go @@ -34,12 +34,7 @@ func TestUrlscan_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/user/user_test.go b/pkg/detectors/user/user_test.go index 1847ee565f75..7a4abbade913 100644 --- a/pkg/detectors/user/user_test.go +++ b/pkg/detectors/user/user_test.go @@ -34,12 +34,7 @@ func TestUser_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/userflow/userflow_test.go b/pkg/detectors/userflow/userflow_test.go index 4764804e3ee0..4c10995bc10f 100644 --- a/pkg/detectors/userflow/userflow_test.go +++ b/pkg/detectors/userflow/userflow_test.go @@ -34,12 +34,7 @@ func TestUserflow_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/userstack/userstack_test.go b/pkg/detectors/userstack/userstack_test.go index 80b6383b5f60..51590dae26f5 100644 --- a/pkg/detectors/userstack/userstack_test.go +++ b/pkg/detectors/userstack/userstack_test.go @@ -34,12 +34,7 @@ func TestUserStack_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_test.go b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_test.go index 9136f1c3cb52..acc9023d63e8 100644 --- a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_test.go +++ b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken_test.go @@ -35,11 +35,6 @@ func TestVagrantcloudpersonaltoken_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vatlayer/vatlayer_test.go b/pkg/detectors/vatlayer/vatlayer_test.go index 272a355d100e..b69a05e6cbfd 100644 --- a/pkg/detectors/vatlayer/vatlayer_test.go +++ b/pkg/detectors/vatlayer/vatlayer_test.go @@ -35,11 +35,6 @@ func TestVatLayer_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vbout/vbout_test.go b/pkg/detectors/vbout/vbout_test.go index 2382101d3fb1..6f84135d67ba 100644 --- a/pkg/detectors/vbout/vbout_test.go +++ b/pkg/detectors/vbout/vbout_test.go @@ -35,11 +35,6 @@ func TestVbout_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vercel/vercel_test.go b/pkg/detectors/vercel/vercel_test.go index 47d7797b404d..6cabc93c4220 100644 --- a/pkg/detectors/vercel/vercel_test.go +++ b/pkg/detectors/vercel/vercel_test.go @@ -34,12 +34,7 @@ func TestVercel_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/verimail/verimail_test.go b/pkg/detectors/verimail/verimail_test.go index ef019dde7192..ba5e478359e4 100644 --- a/pkg/detectors/verimail/verimail_test.go +++ b/pkg/detectors/verimail/verimail_test.go @@ -35,11 +35,6 @@ func TestVerimail_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/veriphone/veriphone_test.go b/pkg/detectors/veriphone/veriphone_test.go index fa62c8c7a5d5..3b458a0bbbda 100644 --- a/pkg/detectors/veriphone/veriphone_test.go +++ b/pkg/detectors/veriphone/veriphone_test.go @@ -34,12 +34,7 @@ func TestVeriphone_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/versioneye/versioneye_test.go b/pkg/detectors/versioneye/versioneye_test.go index 87ddd6345367..b3ac792f2099 100644 --- a/pkg/detectors/versioneye/versioneye_test.go +++ b/pkg/detectors/versioneye/versioneye_test.go @@ -34,12 +34,7 @@ func TestVersionEye_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/viewneo/viewneo_test.go b/pkg/detectors/viewneo/viewneo_test.go index bc0aaacb96ed..d326ba08ba16 100644 --- a/pkg/detectors/viewneo/viewneo_test.go +++ b/pkg/detectors/viewneo/viewneo_test.go @@ -34,12 +34,7 @@ func TestViewneo_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/virustotal/virustotal_test.go b/pkg/detectors/virustotal/virustotal_test.go index 199bd4897844..a0ff13282dd0 100644 --- a/pkg/detectors/virustotal/virustotal_test.go +++ b/pkg/detectors/virustotal/virustotal_test.go @@ -34,12 +34,7 @@ func TestVirusTotal_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/visualcrossing/visualcrossing_test.go b/pkg/detectors/visualcrossing/visualcrossing_test.go index 98e0a90b7945..485ee7dca6f4 100644 --- a/pkg/detectors/visualcrossing/visualcrossing_test.go +++ b/pkg/detectors/visualcrossing/visualcrossing_test.go @@ -35,11 +35,6 @@ func TestVisualcrossing_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/voicegain/voicegain_test.go b/pkg/detectors/voicegain/voicegain_test.go index ca914bc77c5e..d2e08b512915 100644 --- a/pkg/detectors/voicegain/voicegain_test.go +++ b/pkg/detectors/voicegain/voicegain_test.go @@ -35,11 +35,6 @@ func TestVoicegain_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/voodoosms/voodoosms_test.go b/pkg/detectors/voodoosms/voodoosms_test.go index 5711c0de6127..3c061a1f3a12 100644 --- a/pkg/detectors/voodoosms/voodoosms_test.go +++ b/pkg/detectors/voodoosms/voodoosms_test.go @@ -34,12 +34,7 @@ func TestVoodooSMS_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vpnapi/vpnapi_test.go b/pkg/detectors/vpnapi/vpnapi_test.go index 438806f947a7..428e4b164f4a 100644 --- a/pkg/detectors/vpnapi/vpnapi_test.go +++ b/pkg/detectors/vpnapi/vpnapi_test.go @@ -34,12 +34,7 @@ func TestVpnapi_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vultrapikey/vultrapikey_test.go b/pkg/detectors/vultrapikey/vultrapikey_test.go index c894f154dbda..f2f6a626cfc5 100644 --- a/pkg/detectors/vultrapikey/vultrapikey_test.go +++ b/pkg/detectors/vultrapikey/vultrapikey_test.go @@ -35,11 +35,6 @@ func TestVultrApiKey_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/vyte/vyte_test.go b/pkg/detectors/vyte/vyte_test.go index 4fac5b388bf6..62c74fb654d2 100644 --- a/pkg/detectors/vyte/vyte_test.go +++ b/pkg/detectors/vyte/vyte_test.go @@ -34,12 +34,7 @@ func TestVyte_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/walkscore/walkscore_test.go b/pkg/detectors/walkscore/walkscore_test.go index 838f33f12ffe..58699e8e6d99 100644 --- a/pkg/detectors/walkscore/walkscore_test.go +++ b/pkg/detectors/walkscore/walkscore_test.go @@ -35,11 +35,6 @@ func TestWalkscore_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/weatherbit/weatherbit_test.go b/pkg/detectors/weatherbit/weatherbit_test.go index 44d7cb611f75..2150c12baa43 100644 --- a/pkg/detectors/weatherbit/weatherbit_test.go +++ b/pkg/detectors/weatherbit/weatherbit_test.go @@ -35,11 +35,6 @@ func TestWeatherbit_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/weatherstack/weatherstack_test.go b/pkg/detectors/weatherstack/weatherstack_test.go index 0e688a48ec9e..3ac4ce76113a 100644 --- a/pkg/detectors/weatherstack/weatherstack_test.go +++ b/pkg/detectors/weatherstack/weatherstack_test.go @@ -35,11 +35,6 @@ func TestWeatherstack_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/web3storage/web3storage_test.go b/pkg/detectors/web3storage/web3storage_test.go index 0210b71dcf36..4c7e6d1ba344 100644 --- a/pkg/detectors/web3storage/web3storage_test.go +++ b/pkg/detectors/web3storage/web3storage_test.go @@ -35,11 +35,6 @@ func TestWeb3Storage_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/webflow/webflow_test.go b/pkg/detectors/webflow/webflow_test.go index 2a2b58ae7675..b39fa95abe8e 100644 --- a/pkg/detectors/webflow/webflow_test.go +++ b/pkg/detectors/webflow/webflow_test.go @@ -34,12 +34,7 @@ func TestWebflow_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/webscraper/webscraper_test.go b/pkg/detectors/webscraper/webscraper_test.go index 094406fc5f25..c2bf5e61bb20 100644 --- a/pkg/detectors/webscraper/webscraper_test.go +++ b/pkg/detectors/webscraper/webscraper_test.go @@ -35,11 +35,6 @@ func TestWebScraper_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/webscraping/webscraping_test.go b/pkg/detectors/webscraping/webscraping_test.go index b556f341164d..d76bb3266e18 100644 --- a/pkg/detectors/webscraping/webscraping_test.go +++ b/pkg/detectors/webscraping/webscraping_test.go @@ -35,11 +35,6 @@ func TestWebscraping_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/whoxy/whoxy_test.go b/pkg/detectors/whoxy/whoxy_test.go index 5db060da7177..9e93f1860dc0 100644 --- a/pkg/detectors/whoxy/whoxy_test.go +++ b/pkg/detectors/whoxy/whoxy_test.go @@ -35,11 +35,6 @@ func TestWhoxy_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/wistia/wistia_test.go b/pkg/detectors/wistia/wistia_test.go index a92b777b90e2..cd6b44e948da 100644 --- a/pkg/detectors/wistia/wistia_test.go +++ b/pkg/detectors/wistia/wistia_test.go @@ -34,12 +34,7 @@ func TestWistia_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/wit/wit_test.go b/pkg/detectors/wit/wit_test.go index 393caa4a9584..cd0892a0f75f 100644 --- a/pkg/detectors/wit/wit_test.go +++ b/pkg/detectors/wit/wit_test.go @@ -34,12 +34,7 @@ func TestWit_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/worksnaps/worksnaps_test.go b/pkg/detectors/worksnaps/worksnaps_test.go index 48dfab4d75fc..ab2c0191041b 100644 --- a/pkg/detectors/worksnaps/worksnaps_test.go +++ b/pkg/detectors/worksnaps/worksnaps_test.go @@ -34,12 +34,7 @@ func TestWorksnaps_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/workstack/workstack_test.go b/pkg/detectors/workstack/workstack_test.go index 7c1465b40824..964f35811dc0 100644 --- a/pkg/detectors/workstack/workstack_test.go +++ b/pkg/detectors/workstack/workstack_test.go @@ -35,11 +35,6 @@ func TestWorkstack_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/worldcoinindex/worldcoinindex_test.go b/pkg/detectors/worldcoinindex/worldcoinindex_test.go index 9ca3855135be..3c603fdc83f0 100644 --- a/pkg/detectors/worldcoinindex/worldcoinindex_test.go +++ b/pkg/detectors/worldcoinindex/worldcoinindex_test.go @@ -35,11 +35,6 @@ func TestWorldCoinIndex_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/worldweather/worldweather_test.go b/pkg/detectors/worldweather/worldweather_test.go index bdccde9d448a..6f96a628691a 100644 --- a/pkg/detectors/worldweather/worldweather_test.go +++ b/pkg/detectors/worldweather/worldweather_test.go @@ -35,11 +35,6 @@ func TestWorldweather_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/wrike/wrike_test.go b/pkg/detectors/wrike/wrike_test.go index 49720af70df2..52afa69857af 100644 --- a/pkg/detectors/wrike/wrike_test.go +++ b/pkg/detectors/wrike/wrike_test.go @@ -35,11 +35,6 @@ func TestWrike_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/yandex/yandex_test.go b/pkg/detectors/yandex/yandex_test.go index d02614f14b33..5ec63d123fe0 100644 --- a/pkg/detectors/yandex/yandex_test.go +++ b/pkg/detectors/yandex/yandex_test.go @@ -35,11 +35,6 @@ func TestYandex_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/yelp/yelp_test.go b/pkg/detectors/yelp/yelp_test.go index e9d812ba7ba7..b33038413500 100644 --- a/pkg/detectors/yelp/yelp_test.go +++ b/pkg/detectors/yelp/yelp_test.go @@ -35,11 +35,6 @@ func TestYelp_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/youneedabudget/youneedabudget_test.go b/pkg/detectors/youneedabudget/youneedabudget_test.go index 37410b571799..8274e95813f7 100644 --- a/pkg/detectors/youneedabudget/youneedabudget_test.go +++ b/pkg/detectors/youneedabudget/youneedabudget_test.go @@ -35,11 +35,6 @@ func TestYouNeedABudget_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/yousign/yousign_test.go b/pkg/detectors/yousign/yousign_test.go index 58924c24dd16..90ca5689ffc6 100644 --- a/pkg/detectors/yousign/yousign_test.go +++ b/pkg/detectors/yousign/yousign_test.go @@ -35,11 +35,6 @@ func TestYousign_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zenkitapi/zenkitapi_test.go b/pkg/detectors/zenkitapi/zenkitapi_test.go index 6c141e8b62c9..c597c5de6439 100644 --- a/pkg/detectors/zenkitapi/zenkitapi_test.go +++ b/pkg/detectors/zenkitapi/zenkitapi_test.go @@ -34,12 +34,7 @@ func TestZenkitAPI_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zenrows/zenrows_test.go b/pkg/detectors/zenrows/zenrows_test.go index aa0881767e0f..26c96ebd72ba 100644 --- a/pkg/detectors/zenrows/zenrows_test.go +++ b/pkg/detectors/zenrows/zenrows_test.go @@ -34,12 +34,7 @@ func TestZenRows_Pattern(t *testing.T) { name: "valid pattern - ignore duplicate", input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, - }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, +}, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zenscrape/zenscrape_test.go b/pkg/detectors/zenscrape/zenscrape_test.go index ece51f9e8edf..c0d76fb9c3dd 100644 --- a/pkg/detectors/zenscrape/zenscrape_test.go +++ b/pkg/detectors/zenscrape/zenscrape_test.go @@ -35,11 +35,6 @@ func TestZenscrape_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zenserp/zenserp_test.go b/pkg/detectors/zenserp/zenserp_test.go index 351b2363237d..b511376cf764 100644 --- a/pkg/detectors/zenserp/zenserp_test.go +++ b/pkg/detectors/zenserp/zenserp_test.go @@ -35,11 +35,6 @@ func TestZenserp_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zeplin/zeplin_test.go b/pkg/detectors/zeplin/zeplin_test.go index 9353a289d822..59ceea98026b 100644 --- a/pkg/detectors/zeplin/zeplin_test.go +++ b/pkg/detectors/zeplin/zeplin_test.go @@ -35,11 +35,6 @@ func TestZeplin_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zerobounce/zerobounce_test.go b/pkg/detectors/zerobounce/zerobounce_test.go index 82b9f366f849..d13127dd54a7 100644 --- a/pkg/detectors/zerobounce/zerobounce_test.go +++ b/pkg/detectors/zerobounce/zerobounce_test.go @@ -35,11 +35,6 @@ func TestZerobounce_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zerotier/zerotier_test.go b/pkg/detectors/zerotier/zerotier_test.go index a9fd37244cc5..e1ee0980110d 100644 --- a/pkg/detectors/zerotier/zerotier_test.go +++ b/pkg/detectors/zerotier/zerotier_test.go @@ -35,11 +35,6 @@ func TestZerotier_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zipcodeapi/zipcodeapi_test.go b/pkg/detectors/zipcodeapi/zipcodeapi_test.go index 778d150cbbb1..e42dfe2551d9 100644 --- a/pkg/detectors/zipcodeapi/zipcodeapi_test.go +++ b/pkg/detectors/zipcodeapi/zipcodeapi_test.go @@ -35,11 +35,6 @@ func TestZipCodeAPI_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zipcodebase/zipcodebase_test.go b/pkg/detectors/zipcodebase/zipcodebase_test.go index 57a3d62a0fe7..58ed71944ee2 100644 --- a/pkg/detectors/zipcodebase/zipcodebase_test.go +++ b/pkg/detectors/zipcodebase/zipcodebase_test.go @@ -35,11 +35,6 @@ func TestZipcodebase_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern), diff --git a/pkg/detectors/zonkafeedback/zonkafeedback_test.go b/pkg/detectors/zonkafeedback/zonkafeedback_test.go index 2fd3a68e96d2..d0b98d706741 100644 --- a/pkg/detectors/zonkafeedback/zonkafeedback_test.go +++ b/pkg/detectors/zonkafeedback/zonkafeedback_test.go @@ -35,11 +35,6 @@ func TestZonkaFeedback_Pattern(t *testing.T) { input: fmt.Sprintf("%s token = '%s' | '%s'", keyword, validPattern, validPattern), want: []string{validPattern}, }, - { - name: "valid pattern - key out of prefix range", - input: fmt.Sprintf("%s keyword is not close to the real key in the data\n = '%s'", keyword, validPattern), - want: []string{}, - }, { name: "invalid pattern", input: fmt.Sprintf("%s = '%s'", keyword, invalidPattern),