Skip to content

Commit

Permalink
Applying auto-formatting to several files.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 265059924
  • Loading branch information
epere4 committed Aug 23, 2019
1 parent afdf49f commit 0892ec9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test", "cc_binary")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")

licenses(["notice"])

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ Apache license. See LICENSE for more information.

To learn more about this project:

* check out the [internet draft](https://tools.ietf.org/html/draft-koster-rep),
* check out the
[internet draft](https://tools.ietf.org/html/draft-koster-rep),
* how
[Google's handling robots.txt](https://developers.google.com/search/reference/robots_txt),
* or for a high level overview, the
Expand Down
9 changes: 5 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
workspace(name = "com_google_robotstxt")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
Expand All @@ -9,10 +10,10 @@ http_archive(

# GoogleTest/GoogleMock framework. Used by unit-tests.
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip"], # 2019-01-07
strip_prefix = "googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb",
sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
name = "com_google_googletest",
sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
strip_prefix = "googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb",
urls = ["https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip"], # 2019-01-07
)

# C++ rules for Bazel.
Expand Down
28 changes: 15 additions & 13 deletions robots_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,19 @@ bool LoadFile(const std::string& filename, std::string* result) {
}

void ShowHelp(int argc, char** argv) {
std::cerr << "Shows whether the given user_agent and URI combination"
<< " is allowed or disallowed by the given robots.txt file. "
<< std::endl << std::endl;
std::cerr << "Usage: " << std::endl << " " << argv[0]
<< " <robots.txt filename> <user_agent> <URI>"
<< std::endl << std::endl;
std::cerr << "The URI must be %-encoded according to RFC3986."
<< std::endl << std::endl;
std::cerr << "Example: " << std::endl
<< " " << argv[0] << " robots.txt FooBot http://example.com/foo"
<< std::endl;
std::cerr << "Shows whether the given user_agent and URI combination"
<< " is allowed or disallowed by the given robots.txt file. "
<< std::endl
<< std::endl;
std::cerr << "Usage: " << std::endl
<< " " << argv[0] << " <robots.txt filename> <user_agent> <URI>"
<< std::endl
<< std::endl;
std::cerr << "The URI must be %-encoded according to RFC3986." << std::endl
<< std::endl;
std::cerr << "Example: " << std::endl
<< " " << argv[0] << " robots.txt FooBot http://example.com/foo"
<< std::endl;
}

int main(int argc, char** argv) {
Expand All @@ -73,8 +75,8 @@ int main(int argc, char** argv) {
return 0;
}
if (argc != 4) {
std::cerr << "Invalid amount of arguments. Showing help."
<< std::endl << std::endl;
std::cerr << "Invalid amount of arguments. Showing help." << std::endl
<< std::endl;
ShowHelp(argc, argv);
return 1;
}
Expand Down

0 comments on commit 0892ec9

Please sign in to comment.