Skip to content

Commit

Permalink
Move docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Sep 10, 2024
1 parent ad2cb41 commit 54942b3
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions dojo/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,45 @@


def simple_search(request):

"""
query: some keywords
operators: {}
keywords: ['some', 'keywords']
query: some key-word
operators: {}
keywords: ['some', 'key-word']
query: keyword with "space inside"
operators: {}
keywords: ['keyword', 'with', 'space inside']
query: tag:anchore word tags:php
operators: {'tag': ['anchore'], 'tags': ['php']}
keywords: ['word']
query: tags:php,magento
operators: {'tags': ['php,magento']}
keywords: []
query: tags:php tags:magento
operators: {'tags': ['php', 'magento']}
keywords: []
query: tags:"php, magento"
operators: {'tags': ['php, magento']}
keywords: []
query: tags:anchorse some "space inside"
operators: {'tags': ['anchorse']}
keywords: ['some', 'space inside']
query: tags:anchore vulnerability_id:CVE-2020-1234 jquery
operators: {'tags': ['anchore'], 'vulnerability_id': ['CVE-2020-1234']}
keywords: ['jquery']
"""

tests = None
findings = None
finding_templates = None
Expand Down Expand Up @@ -364,45 +403,6 @@ def simple_search(request):
response.delete_cookie("highlight", path="/")
return response

"""
query: some keywords
operators: {}
keywords: ['some', 'keywords']
query: some key-word
operators: {}
keywords: ['some', 'key-word']
query: keyword with "space inside"
operators: {}
keywords: ['keyword', 'with', 'space inside']
query: tag:anchore word tags:php
operators: {'tag': ['anchore'], 'tags': ['php']}
keywords: ['word']
query: tags:php,magento
operators: {'tags': ['php,magento']}
keywords: []
query: tags:php tags:magento
operators: {'tags': ['php', 'magento']}
keywords: []
query: tags:"php, magento"
operators: {'tags': ['php, magento']}
keywords: []
query: tags:anchorse some "space inside"
operators: {'tags': ['anchorse']}
keywords: ['some', 'space inside']
query: tags:anchore vulnerability_id:CVE-2020-1234 jquery
operators: {'tags': ['anchore'], 'vulnerability_id': ['CVE-2020-1234']}
keywords: ['jquery']
"""
return None


# it's not google grade parsing, but let's do some basic stuff right
def parse_search_query(clean_query):
Expand Down

0 comments on commit 54942b3

Please sign in to comment.