Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #1246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/fbcode_builder/CMake/fb_py_test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,12 @@ def init_option_parser(self):
op.add_option(
"--coverage-include",
default="*",
help='File globs to include in converage (split by ",")',
help='File globs to include in coverage (split by ",")',
)
op.add_option(
"--coverage-omit",
default="",
help='File globs to omit from converage (split by ",")',
help='File globs to omit from coverage (split by ",")',
)
op.add_option(
"--logger",
Expand Down
2 changes: 1 addition & 1 deletion build/fbcode_builder/getdeps/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _resolve_config(self, dep_to_git) -> typing.Dict[str, typing.Dict[str, str]]
def _resolve_dep_to_git(self):
"""
For each direct dependency of the currently build manifest check if it
is also cargo-builded and if yes then extract it's git configs and
is also cargo-built and if yes then extract it's git configs and
install dir
"""
dependencies = self.manifest.get_dependencies(self.ctx)
Expand Down
2 changes: 1 addition & 1 deletion watchman/ChildProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ChildProcess {
#ifdef POSIX_SPAWN_SETSIGMASK
void setSigMask(const sigset_t& mask);
#endif
// Adds flags to the set of flags maintainted in the spawn attributes.
// Adds flags to the set of flags maintained in the spawn attributes.
// This is logically equivalent to calling setflags(getflags()|flags)
void setFlags(short flags);

Expand Down
4 changes: 2 additions & 2 deletions watchman/PendingCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ struct watchman_pending_fs : watchman::PendingChange {
* efficiently prunes redundant changes.
*
* PendingChanges is only intended to be accessed by one thread at a time.
* If you would like to use a single pending changes object accross
* If you would like to use a single pending changes object across
* threads, you should use PendingCollection which puts a lock around
* accesses to the unerlying PendingChanges object. If you only intend to
* accesses to the underlying PendingChanges object. If you only intend to
* use the object on one thread, then you can use PendingChanges directly.
*/
class PendingChanges {
Expand Down
2 changes: 1 addition & 1 deletion watchman/SanityCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace watchman {
namespace {

// Work-around decodeNext which implictly resets to non-blocking
// Work-around decodeNext which implicitly resets to non-blocking
std::optional<json_ref>
decodeNext(watchman_stream* client, PduBuffer& buf, json_error_t& jerr) {
client->setNonBlock(false);
Expand Down
2 changes: 1 addition & 1 deletion watchman/cli/src/rage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ impl WatchmanRage {
} else {
writeln!(
self.stream,
"Failed to retireve configuration from Watchman. Not checking if configuration matches on-disk setting"
"Failed to retrieve configuration from Watchman. Not checking if configuration matches on-disk setting"
)?;
}

Expand Down
2 changes: 1 addition & 1 deletion watchman/cmds/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static UntypedResponse cmd_state_leave(
try {
result.throwUnlessValue();
} catch (const std::exception& exc) {
// The sync failed for whatever reason; log it and take no futher
// The sync failed for whatever reason; log it and take no further
// action
log(ERR, "state-leave sync failed: ", exc.what(), "\n");
return;
Expand Down
2 changes: 1 addition & 1 deletion watchman/cmds/subscribe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ std::optional<UntypedResponse> ClientSubscription::buildSubscriptionResults(
position = res.clockAtStartOfQuery;

// An SCM operation was interleaved with the query execution. This could
// result in over-reporing query results. Discard our results but, do not
// result in over-reporting query results. Discard our results but, do not
// update the clock in order to allow changes to be reported the next time
// the query is run.
bool scmAwareQuery = since_spec && since_spec->hasScmParams();
Expand Down
2 changes: 1 addition & 1 deletion watchman/cppclient/WatchmanClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/* A C++ client library for accessing Watchman. This builds on top of
* WatchmanConnection to provide a C++ friendly subscription API and maybe
* later other convienence functions. The entry point for this API is via
* later other convenience functions. The entry point for this API is via
* the WatchmanClient type.
*
* Example usage:
Expand Down
2 changes: 1 addition & 1 deletion watchman/fs/FSDetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ std::optional<w_string> find_fstype_in_linux_proc_mounts(
if (folly::split(
" ", line, device, mountPoint, vfstype, opts, freq, passno)) {
// Look for the mountPoint that matches the longest prefix of path
// we intentially bias towards the last matching path
// we intentionally bias towards the last matching path
if (mountPoint.size() >= bestMountPoint.size() &&
folly::StringPiece{path}.startsWith(mountPoint)) {
if (
Expand Down
2 changes: 1 addition & 1 deletion watchman/fs/FileInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using ino_t = unsigned int;
using nlink_t = unsigned int;

/**
* Convertion between st_mode and d_type on Windows. On Windows the 4th nibble
* Conversion between st_mode and d_type on Windows. On Windows the 4th nibble
* of mode contains the type of directory entry. Right shifting by 12 bits to
* form a d_type.
*/
Expand Down
2 changes: 1 addition & 1 deletion watchman/fs/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ w_string realPath(const char* path) {
// On Windows, "" is used to refer to the CWD.
// We also allow using "." for parity with unix, even though that
// doesn't generally work for that purpose on windows.
// This allows `watchman watch-project .` to succeeed on windows.
// This allows `watchman watch-project .` to succeed on windows.
if (path[0] == 0 || (path[0] == '.' && path[1] == 0)) {
return getCurrentDirectory();
}
Expand Down
2 changes: 1 addition & 1 deletion watchman/fs/ParallelWalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void readDirTask(
IoErrorWithPath error{
std::move(fileFullPath), err, "getFileInformation"};
context->errorQueue.enqueue(error);
// Contine checking other entries.
// Continue checking other entries.
continue;
}
}
Expand Down
6 changes: 3 additions & 3 deletions watchman/fs/ParallelWalk.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ class ParallelWalker final {
/**
* Obtain the next ReadDirResult. Might block.
*
* Parent directory is guarnateed to be provided before child directories.
* Parent directory is guaranteed to be provided before child directories.
* After completion, always return nullopt without blocking.
*/
std::optional<ReadDirResult> nextResult();

/**
* Obtain an occured error. Might block.
* Obtain an occurred error. Might block.
*
* After completion, always return nullopt without blocking.
*/
Expand All @@ -91,7 +91,7 @@ class ParallelWalker final {
*
* Existing tasks will still run to completion but new tasks will exit
* immediately without spawning tasks for subdirectories.
* context_ will be dropped after completeing all tasks.
* context_ will be dropped after completing all tasks.
*/
~ParallelWalker();

Expand Down
2 changes: 1 addition & 1 deletion watchman/integration/cppclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int main(int argc, char** argv) {
eb,
[&](folly::Try<dynamic>&& data) {
if (data.hasException()) {
LOG(INFO) << "Expected subcription error caught";
LOG(INFO) << "Expected subscription error caught";
subErrorCallbackTrigger.setValue();
}
})
Expand Down
8 changes: 4 additions & 4 deletions watchman/integration/eden/test_eden_since.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def test_eden_since_removal(self) -> None:
# file/directory is removed, and thus this is reported to Watchman as
# an UNKNOWN file, which for removed files/directory will be reported
# as a removed file.
self.assertQueryRepsonseEqual(
self.assertQueryResponseEqual(
[{"name": "adir", "type": "f"}, {"name": "adir/file", "type": "f"}],
first_res["files"],
)
Expand All @@ -274,7 +274,7 @@ def test_eden_since_across_update(self) -> None:

first_res = self.query_adir_change_since(root, first_clock)

self.assertQueryRepsonseEqual(
self.assertQueryResponseEqual(
[{"name": "adir", "type": "d"}, {"name": "adir/file", "type": "f"}],
first_res["files"],
)
Expand All @@ -288,7 +288,7 @@ def test_eden_since_across_update(self) -> None:

second_res = self.query_adir_change_since(root, second_clock)

self.assertQueryRepsonseEqual(
self.assertQueryResponseEqual(
[{"name": "adir", "type": "d"}, {"name": "adir/file", "type": "f"}],
second_res["files"],
)
Expand Down Expand Up @@ -351,7 +351,7 @@ def do_query(clock):

res = do_query(clock)
self.assertFalse(res["is_fresh_instance"])
self.assertQueryRepsonseEqual(["hello"], res["files"])
self.assertQueryResponseEqual(["hello"], res["files"])

def test_eden_since_dotfiles_change(self) -> None:
root = self.makeEdenMount(
Expand Down
2 changes: 1 addition & 1 deletion watchman/integration/lib/WatchmanTestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def assertFileList(
# pyre-fixme[16]: `WatchmanTestCase` has no attribute `last_file_list`.
self.assertFileListsEqual(self.last_file_list, expected_files, message)

def assertQueryRepsonseEqual(self, expected_resp, actual_resp) -> None:
def assertQueryResponseEqual(self, expected_resp, actual_resp) -> None:
# converting the dict to a string version of the json is not
# exactly the fastest function to use to sort, but it is unambiguous.
sorted_expected = sorted(
Expand Down
2 changes: 1 addition & 1 deletion watchman/java/src/com/facebook/watchman/Deserializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public interface Deserializer {

/**
* Reads the next object from the InputSteram, blocking until it becomes available.
* Reads the next object from the InputStream, blocking until it becomes available.
* @param stream the stream to read from
* @return a deserialized object, read from the stream
*/
Expand Down
2 changes: 1 addition & 1 deletion watchman/node/bser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ BunserBuf.prototype.processLater = function() {
// Do something with the buffer to advance our state.
// If we're running synchronously we'll return either
// the value we've decoded or undefined if we don't
// yet have enought data.
// yet have enough data.
// If we're running asynchronously, we'll emit the value
// when it becomes ready and schedule another invocation
// of process on the next tick if we still have data we
Expand Down
2 changes: 1 addition & 1 deletion watchman/python/pywatchman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def _get_overlapped_result_ex_impl(pipe, olap, nbytes, millis, alertable):
# Event is signaled, overlapped IO operation result should be available.
pass
elif waitReturnCode == WAIT_IO_COMPLETION:
# WaitForSingleObjectEx returnes because the system added an I/O completion
# WaitForSingleObjectEx returns because the system added an I/O completion
# routine or an asynchronous procedure call (APC) to the thread queue.
SetLastError(WAIT_IO_COMPLETION)
pass
Expand Down
4 changes: 2 additions & 2 deletions watchman/query/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,13 @@ QueryResult w_query_execute(
}

// Populate transition counter at start of query. This allows us to
// determine if SCM operations ocurred concurrent with query execution.
// determine if SCM operations occurred concurrent with query execution.
res.stateTransCountAtStartOfQuery = root->stateTransCount.load();
resultClock.scmMergeBaseWith = query->since_spec->scmMergeBaseWith;
resultClock.scmMergeBase =
scm->mergeBaseWith(resultClock.scmMergeBaseWith, requestId);
// Always update the saved state storage type and key, but conditionally
// update the saved state commit id below based on wether the mergebase has
// update the saved state commit id below based on whether the mergebase has
// changed.
if (query->since_spec->hasSavedStateParams()) {
resultClock.savedStateStorageType =
Expand Down
2 changes: 1 addition & 1 deletion watchman/root/Root.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class Root : public RootConfig, public std::enable_shared_from_this<Root> {
// all outstanding query contexts that are executing against this root.
// If is only safe to read the query contexts while the queries.rlock()
// is held, and even then it is only really safe to read fields that
// are not changed by the query exection.
// are not changed by the query execution.
folly::Synchronized<std::unordered_set<QueryContext*>> queries;

/**
Expand Down
2 changes: 1 addition & 1 deletion watchman/rust/serde_bser/src/bytestring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use serde::Serialize;
/// When it comes to interoperating with Rust code, ByteString is nominally
/// equivalent to `OsString`/`PathBuf` and is convertible to and from those values.
///
/// It is worth noting that on Windows sytems the conversion from ByteString to OsString is
/// It is worth noting that on Windows systems the conversion from ByteString to OsString is
/// potentially lossy: while convention is that bytestring holds utf8 in the common case in
/// watchman, that isn't enforced by its serializer and we may potentially encounter an error
/// during conversion. Converting from OsString to ByteString can potentially fail on windows
Expand Down
6 changes: 3 additions & 3 deletions watchman/rust/watchman_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub struct ResolvedRoot {
impl ResolvedRoot {
/// Returns the name of the watcher that the server is using to
/// monitor the path. The watcher is generally system dependent,
/// but some systems offer multipler watchers.
/// but some systems offer multiplier watchers.
/// You generally don't care too much about the watcher that is
/// in use, but if the watcher is a virtualized filesystem such as
/// `eden` then you may wish to use to alternative queries to get the
Expand Down Expand Up @@ -430,7 +430,7 @@ enum TaskItem {
RegisterSubscription(String, UnboundedSender<SubscriptionNotification>),
}

/// Splits BSER mesages out of a stream. Does not attempt to actually decode them.
/// Splits BSER messages out of a stream. Does not attempt to actually decode them.
struct BserSplitter;

impl Decoder for BserSplitter {
Expand All @@ -454,7 +454,7 @@ impl Decoder for BserSplitter {
return Ok(None);
}

// We should have succeded in reading some data here, but we didn't. Return an
// We should have succeeded in reading some data here, but we didn't. Return an
// error.
return Err(TaskError::Deserialize {
source: source.into(),
Expand Down
2 changes: 1 addition & 1 deletion watchman/rust/watchman_client/src/pdu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ pub struct SavedStateClockData {
pub enum ContentSha1Hex {
/// The 40-hex-digit SHA1 content hash of the file contents
Hash(String),
/// The error that occured while trying to determine the hash
/// The error that occurred while trying to determine the hash
Error { error: String },
/// Value if the file was deleted.
/// Note that this is distinct from the case where watchman believes
Expand Down
2 changes: 1 addition & 1 deletion watchman/scm/Mercurial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ChildProcess::Options Mercurial::makeHgOptions(
const std::optional<w_string>& requestId) const {
ChildProcess::Options opt;
// Ensure that the hgrc doesn't mess with the behavior
// of the commands that we're runing.
// of the commands that we're running.
opt.environment().set("HGPLAIN", w_string("1"));
// Ensure that we do not telemetry log profiling data for the commands we are
// running by default. This is to avoid a significant increase in the rate of
Expand Down
2 changes: 1 addition & 1 deletion watchman/stream_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static BOOL WINAPI get_overlapped_result_ex_impl(
// available.
break;
case WAIT_IO_COMPLETION:
// WaitForSingleObjectEx returnes because the system added an I/O
// WaitForSingleObjectEx returns because the system added an I/O
// completion routine or an asynchronous procedure call (APC) to the
// thread queue.
SetLastError(WAIT_IO_COMPLETION);
Expand Down
2 changes: 1 addition & 1 deletion watchman/test/StringTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TEST(String, strings) {
EXPECT_TRUE(movedFrom.empty()) << "moved-from string should be empty";

EXPECT_TRUE(w_string_piece().empty())
<< "default constructed string piece shouldbe empty";
<< "default constructed string piece should be empty";

EXPECT_TRUE(w_string::build("").empty()) << "empty string is empty";
}
Expand Down
2 changes: 1 addition & 1 deletion watchman/test/async/test_subscribe_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_subscribe(self):

# Trigger a recrawl and ensure that the subscription isn't lost
self.watchman_command("debug-recrawl", root)
# Touch a file to make sure clock increases and subscribtion event.
# Touch a file to make sure clock increases and subscription event.
# This prevents test failure on some platforms
self.touch_relative(root, "c")

Expand Down
10 changes: 5 additions & 5 deletions watchman/watcher/eden.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class EdenFileResult : public FileResult {
return result;
}

// Thrift error occured
// Thrift error occurred
case SHA1Result::Type::error: {
auto& err = sha1_->get_error();
XCHECK(err.errorCode());
Expand Down Expand Up @@ -1034,10 +1034,10 @@ class EdenView final : public QueryableView {

void clearWatcherDebugInfo() override {}

using EdenFSSubcription =
using EdenFSSubscription =
apache::thrift::ClientBufferedStream<JournalPosition>::Subscription;

EdenFSSubcription rocketSubscribe(
EdenFSSubscription rocketSubscribe(
std::shared_ptr<Root> root,
SettleCallback& settleCallback,
GetJournalPositionCallback& getJournalPositionCallback,
Expand Down Expand Up @@ -1105,7 +1105,7 @@ class EdenView final : public QueryableView {
w_set_thread_name("edensub ", root->root_path.view());
log(DBG, "Started subscription thread\n");

std::optional<EdenFSSubcription> subscription;
std::optional<EdenFSSubscription> subscription;
SCOPE_EXIT {
if (subscription.has_value()) {
subscription->cancel();
Expand Down Expand Up @@ -1338,7 +1338,7 @@ class EdenView final : public QueryableView {
}

/**
* Compute and return all the changes that occured since the last call.
* Compute and return all the changes that occurred since the last call.
*
* On error, or when thresholdForFreshInstance_ is exceeded, the clock will
* be modified to indicate a fresh instance and an empty set of files will be
Expand Down
2 changes: 1 addition & 1 deletion watchman/watcher/portfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ bool PortFSWatcher::waitNotify(int timeoutms) {
return false;
}
if (pfd[1].revents) {
// An exceptional event (delete) occured on the root so delete it
// An exceptional event (delete) occurred on the root so delete it
root_deleted = true;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/cmd/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ _Since 4.6._
_Since 4.9._

- `content.sha1hex` - string: the SHA-1 digest of the file's byte content,
encoded as 40 hexidecimal digits (e.g.
encoded as 40 hexadecimal digits (e.g.
`"da39a3ee5e6b4b0d3255bfef95601890afd80709"` for an empty file)

### Synchronization timeout (since 2.1)
Expand Down
Loading