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

'can not' should mostly be 'cannot' #1891

Merged
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
6 changes: 3 additions & 3 deletions bootstrap/lib/stdlib/include/assert.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
-endif.

%% This is mostly a convenience which gives more detailed reports.
%% Note: Guard is a guarded pattern, and can not be used for value.
%% Note: Guard is a guarded pattern, and cannot be used for value.
-ifdef(NOASSERT).
-define(assertMatch(Guard, Expr), ok).
-define(assertMatch(Guard, Expr, Comment), ok).
Expand Down Expand Up @@ -289,7 +289,7 @@
end).
-endif.

%% Note: Class and Term are patterns, and can not be used for value.
%% Note: Class and Term are patterns, and cannot be used for value.
%% Term can be a guarded pattern, but Class cannot.
-ifdef(NOASSERT).
-define(assertException(Class, Term, Expr), ok).
Expand Down Expand Up @@ -364,7 +364,7 @@
?assertException(throw, Term, Expr, Comment)).

%% This is the inverse case of assertException, for convenience.
%% Note: Class and Term are patterns, and can not be used for value.
%% Note: Class and Term are patterns, and cannot be used for value.
%% Both Class and Term can be guarded patterns.
-ifdef(NOASSERT).
-define(assertNotException(Class, Term, Expr), ok).
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ if test -f "erts/doc/CONF_INFO"; then
fi
done
if test $havexsltproc = "no"; then
echo ' The documentation can not be built.'
echo ' The documentation cannot be built.'
else
echo ' Using fakefop to generate placeholder PDF files.'
fi
Expand Down
2 changes: 1 addition & 1 deletion erts/doc/src/notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9904,7 +9904,7 @@
you use erlang:halt/2 with an integer first argument and
an option list containing {flush,false} as the second
argument. Note that now is flushing not dependant of the
exit code, and you can not only flush async threads
exit code, and you cannot only flush async threads
operations which we deemed as a strange behaviour anyway.
</p>
<p>Also, erlang:halt/1,2 has gotten a new feature: If the
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/big.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef Uint16 ErtsHalfDigit;
#undef BIG_HAVE_DOUBLE_DIGIT
typedef Uint32 ErtsHalfDigit;
#else
#error "can not determine machine size"
#error "cannot determine machine size"
#endif

typedef Uint dsize_t; /* Vector size type */
Expand Down
6 changes: 3 additions & 3 deletions erts/emulator/beam/erl_alloc.types
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
# name space).
# * Types, allocators, classes, and descriptions have different name
# spaces.
# * The type, allocator, and class names INVALID are reserved and can
# not be used.
# * The type, allocator, and class names INVALID are reserved and
# cannot be used.
# * The descriptions invalid_allocator, invalid_class, and invalid_type
# are reserved and can not be used.
# are reserved and cannot be used.
# * Declarations can be done conditionally by use of a
# +if <boolean_variable>
#
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/erl_bif_ddll.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ BIF_RETTYPE erl_ddll_format_error_int_1(BIF_ALIST_1)
"cannot be loaded/unloaded";
break;
case am_permanent:
errstring = "DDLL driver is permanent an can not be unloaded/loaded";
errstring = "DDLL driver is permanent an cannot be unloaded/loaded";
break;
case am_not_loaded:
errstring = "DDLL driver is not loaded";
Expand Down
4 changes: 2 additions & 2 deletions erts/emulator/beam/erl_db_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3126,7 +3126,7 @@ static int partly_bound_can_match_lesser(Eterm partly_bound_1,
if (ret)
erts_fprintf(stderr," can match lesser than ");
else
erts_fprintf(stderr," can not match lesser than ");
erts_fprintf(stderr," cannot match lesser than ");
erts_fprintf(stderr,"%T\n",partly_bound_2);
#endif
return ret;
Expand All @@ -3144,7 +3144,7 @@ static int partly_bound_can_match_greater(Eterm partly_bound_1,
if (ret)
erts_fprintf(stderr," can match greater than ");
else
erts_fprintf(stderr," can not match greater than ");
erts_fprintf(stderr," cannot match greater than ");
erts_fprintf(stderr,"%T\n",partly_bound_2);
#endif
return ret;
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/erl_lock_count.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ ERTS_GLB_INLINE
void lcnt_dec_lock_state__(ethr_atomic_t *l_state) {
ethr_sint_t state = ethr_atomic_dec_read_acqb(l_state);

/* We can not assume that state is >= -1 here; unlock and unacquire might
/* We cannot assume that state is >= -1 here; unlock and unacquire might
* bring it below -1 and race to increment it back. */

if(state < 0) {
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/erl_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ ERL_NIF_TERM enif_make_copy(ErlNifEnv* dst_env, ERL_NIF_TERM src_term)
Eterm* hp;
/*
* No preserved sharing allowed as long as literals are also preserved.
* Process independent environment can not be reached by purge.
* Process independent environment cannot be reached by purge.
*/
sz = size_object(src_term);
hp = alloc_heap(dst_env, sz);
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ make_hash2(Eterm term)
* MUST BE USED AS INPUT FOR THE HASH. Two different terms must always have a
* chance of hashing different when salted: hash([Salt|A]) vs hash([Salt|B]).
*
* This is why we can not use cached hash values for atoms for example.
* This is why we cannot use cached hash values for atoms for example.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/drivers/common/inet_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4390,7 +4390,7 @@ static void desc_close_read(inet_descriptor* desc)
{
if (desc->s != INVALID_SOCKET) {
#ifdef __WIN32__
/* This call can not be right???
/* This call cannot be right???
* We want to turn off read events but keep any write events.
* But on windows driver_select(...,READ,1) is only used as a
* way to hook into the pollset. sock_select is used to control
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/drivers/unix/ttsl_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
static int ttysl_init(void);
static ErlDrvData ttysl_start(ErlDrvPort, char*);

#ifdef HAVE_TERMCAP /* else make an empty driver that can not be opened */
#ifdef HAVE_TERMCAP /* else make an empty driver that cannot be opened */

#ifndef WANT_NONBLOCKING
#define WANT_NONBLOCKING
Expand Down
4 changes: 2 additions & 2 deletions erts/emulator/internal_doc/CarrierMigration.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ limited. We only inspect a limited number of carriers. If none of
those carriers had a free block large enough to satisfy the allocation
request, the search will fail. A carrier in the pool can also be BUSY
if another thread is currently doing block deallocation work on the
carrier. A BUSY carrier will also be skipped by the search as it can
not satisfy the request. The pool is lock-free and we do not want to
carrier. A BUSY carrier will also be skipped by the search as it cannot
satisfy the request. The pool is lock-free and we do not want to
block, waiting for the other thread to finish.

### The bad cluster problem ###
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/test/call_trace_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ seq(M, N, R) when M =< N ->
seq(M, N-1, [N|R]);
seq(_, _, R) -> R.

%% lists:reverse can not be called since it is traced
%% lists:reverse cannot be called since it is traced
reverse(L) ->
reverse(L, []).
%%
Expand Down
4 changes: 2 additions & 2 deletions erts/emulator/test/timer_bif_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ evil_timers(Config) when is_list(Config) ->
%%
%% 1. A timer started with erlang:start_timer(Time, Receiver, Msg),
%% where Msg is a composite term, expires, and the receivers main
%% lock *can not* be acquired immediately (typically when the
%% lock *cannot* be acquired immediately (typically when the
%% receiver *is* running).
%%
%% The wrap tuple ({timeout, TRef, Msg}) will in this case
Expand All @@ -372,7 +372,7 @@ evil_timers(Config) when is_list(Config) ->
RecvTimeOutMsgs0 = evil_recv_timeouts(200),
%% 2. A timer started with erlang:start_timer(Time, Receiver, Msg),
%% where Msg is an immediate term, expires, and the receivers main
%% lock *can not* be acquired immediately (typically when the
%% lock *cannot* be acquired immediately (typically when the
%% receiver *is* running).
%%
%% The wrap tuple will in this case be allocated in a new
Expand Down
2 changes: 1 addition & 1 deletion erts/include/internal/gcc/ethr_membar.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
* issue an aquire memory barrier and an __atomic
* builtin memory acess with the __ATOMIC_RELEASE
* memory model must at least issue a release memory
* barrier. Otherwise the two can not be paired.
* barrier. Otherwise the two cannot be paired.
* 4. All __atomic builtins accessing memory using the
* __ATOMIC_CONSUME builtin can be used for the same
* reason __ATOMIC_ACQUIRE can be used. The ethread
Expand Down
4 changes: 2 additions & 2 deletions erts/preloaded/src/prim_inet.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ type_opt_1(O) when is_atom(O) -> undefined.

%% Get. No supplied value.
type_value(get, undefined) -> false; % Undefined type
%% These two clauses can not happen since they are only used
%% These two clauses cannot happen since they are only used
%% in record fields - from record fields they must have a
%% value though it might be 'undefined', so record fields
%% calls type_value/3, not type_value/2.
Expand Down Expand Up @@ -1723,7 +1723,7 @@ type_value_2(_, _) -> false.

%% Get. No supplied value.
%%
%% These two clauses can not happen since they are only used
%% These two clauses cannot happen since they are only used
%% in record fields - from record fields they must have a
%% value though it might be 'undefined', so record fields
%% calls enc_value/3, not enc_value/2.
Expand Down
2 changes: 1 addition & 1 deletion erts/test/upgrade_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

-define(upgr_sname,otp_upgrade).

%% Applications that are excluded from this test because they can not
%% Applications that are excluded from this test because they cannot
%% just be started in a new node with out specific configuration.
-define(start_exclude,
[cosEvent,cosEventDomain,cosFileTransfer,cosNotification,
Expand Down
2 changes: 1 addition & 1 deletion lib/asn1/src/asn1ct_check.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5770,7 +5770,7 @@ format_error({missing_ocft,Component}) ->
format_error(multiple_uniqs) ->
"implementation limitation: only one UNIQUE field is allowed in CLASS";
format_error({namelist_redefinition,Name}) ->
io_lib:format("the name '~s' can not be redefined", [Name]);
io_lib:format("the name '~s' cannot be redefined", [Name]);
format_error({param_bad_type, Ref}) ->
io_lib:format("'~p' is not a parameterized type", [Ref]);
format_error(param_wrong_number_of_arguments) ->
Expand Down
2 changes: 1 addition & 1 deletion lib/asn1/test/asn1_SUITE_data/IN-CS-1-Datatypes.asn
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ FilteringCriteria ::= CHOICE {

-- In case calledAddressValue is specified, the numbers to be filtered are from calledAddressValue
-- up to and including calledAddressValue + maximumNumberOfCounters-1.
-- The last two digits of calledAddressvalue can not exceed 100-maximumNumberOfCounters.
-- The last two digits of calledAddressvalue cannot exceed 100-maximumNumberOfCounters.
FilteringTimeOut ::= CHOICE {
duration [0] Duration,
stopTime [1] DateAndTime
Expand Down
2 changes: 1 addition & 1 deletion lib/common_test/doc/src/ct_hooks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
<seealso marker="common_test#Module:end_per_testcase-2"><c>end_per_testcase</c></seealso>
instead.</p>

<p>This function can not change the result of the test case by returning skip or fail
<p>This function cannot change the result of the test case by returning skip or fail
tuples, but it may insert items in <c>Config</c> that can be read in
<c>end_per_testcase/2</c> or in <c>post_end_per_testcase/5</c>.</p>

Expand Down
10 changes: 5 additions & 5 deletions lib/common_test/doc/src/notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@
ct_netconfc:close_session sometimes returned
{error,closed} because the ssh connection was closed
(from the server side) before the rpc-reply was received
by the client. This is normal and can not be helped. It
by the client. This is normal and cannot be helped. It
has been corrected so the return will be 'ok' in this
case. Other error situations will still give
{error,Reason}.</p>
Expand All @@ -2103,7 +2103,7 @@
{error,{process_down,Pid,normal}} because the ssh
connection was closed (from the server side) before the
rpc-reply was received by the client. This is normal and
can not be helped. It has been corrected so the return
cannot be helped. It has been corrected so the return
will be 'ok' in this situation.</p>
<p>
Own Id: OTP-10570</p>
Expand Down Expand Up @@ -2755,8 +2755,8 @@
The info function for <c>init/end_per_suite(Config)</c>
is <c>init/end_per_suite()</c>, and for
<c>init/end_per_group(GroupName,Config)</c> it's
<c>init/end_per_group(GroupName)</c>. Info functions can
not be used with <c>init/end_per_testcase(TestCase,
<c>init/end_per_group(GroupName)</c>. Info functions
cannot be used with <c>init/end_per_testcase(TestCase,
Config)</c>, since these configuration functions execute
on the test case process and will use the same properties
as the test case (i.e. properties set by the test case
Expand Down Expand Up @@ -3840,7 +3840,7 @@
If the Erlang runtime system was started without access
to an erlang shell (e.g. -noshell), compilation errors
would cause a crash in the Common Test application.
Without access to a shell, Common Test can not prompt the
Without access to a shell, Common Test cannot prompt the
user to choose to continue or abort the test session, but
must assume that the session should proceed.</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion lib/common_test/src/ct_framework.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ get_all(Mod, ConfTests) ->
case code:which(Mod) of
non_existing ->
list_to_atom(atom_to_list(Mod)++
" can not be compiled or loaded");
" cannot be compiled or loaded");
_ ->
list_to_atom(atom_to_list(Mod)++":all/0 is missing")
end,
Expand Down
8 changes: 4 additions & 4 deletions lib/common_test/src/ct_release_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@
%% returned configuration must therefore also be returned from
%% the calling `init_per_*'.
%%
%% If the initialization fails, e.g. if a required release can
%% not be found, the function returns `{skip,Reason}'. In
%% If the initialization fails, e.g. if a required release
%% cannot be found, the function returns `{skip,Reason}'. In
%% this case the other test support functions in this mudule
%% can not be used.
%% cannot be used.
%%
%% Example:
%%
Expand Down Expand Up @@ -426,7 +426,7 @@ init_upgrade_test(Level) ->
case OldRel of
false ->
ct:log("Release ~tp is not available."
" Upgrade on '~p' level can not be tested.",
" Upgrade on '~p' level cannot be tested.",
[FromVsn,Level]),
undefined;
_ ->
Expand Down
2 changes: 1 addition & 1 deletion lib/common_test/src/ct_telnet.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ match_line(Name,Pid,Line,[Pattern|Patterns],FoundPrompt,Term,EO,RetTag) ->
end;
match_line(Name,Pid,Line,[],FoundPrompt,Term,EO,match) ->
match_line(Name,Pid,Line,EO#eo.haltpatterns,FoundPrompt,Term,EO,halt);
%% print any terminated line that can not be matched
%% print any terminated line that cannot be matched
match_line(Name,Pid,Line,[],_FoundPrompt,true,_EO,halt) ->
log(name_or_pid(Name,Pid)," ~ts",[Line]),
nomatch;
Expand Down
4 changes: 2 additions & 2 deletions lib/common_test/src/test_server_ctrl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ temp_nodename([Chr|Base], Acc) ->
%%
%% Counts the test cases that are about to run and returns that number.
%% If there's a conf group in TestSpec with a repeat property, the total number
%% of cases can not be calculated and NoOfCases = unknown.
%% of cases cannot be calculated and NoOfCases = unknown.
count_test_cases(TopCases, SkipCases) when is_list(TopCases) ->
case collect_all_cases(TopCases, SkipCases) of
{error,_Why} = Error ->
Expand Down Expand Up @@ -4906,7 +4906,7 @@ collect_files(Dir, Pattern, St, Mode) ->
fullname_to_mod(Path) when is_list(Path) ->
%% If this is called with a binary, then we are probably in +fnu
%% mode and have found a beam file with name encoded as latin1. We
%% will let this crash since it can not work to load such a module
%% will let this crash since it cannot work to load such a module
%% anyway. It should be removed or renamed!
list_to_atom(filename:rootname(filename:basename(Path))).

Expand Down
4 changes: 2 additions & 2 deletions lib/common_test/test/ct_auto_compile_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ test_events(ac_flag) ->
{?eh,start_info,{1,1,3}},
{?eh,tc_start,{ct_framework,error_in_suite}},
{?eh,tc_done,{ct_framework,error_in_suite,
{failed,{error,'bad_SUITE can not be compiled or loaded'}}}},
{failed,{error,'bad_SUITE cannot be compiled or loaded'}}}},
{?eh,tc_start,{dummy_SUITE,init_per_suite}},
{?eh,tc_done,{dummy_SUITE,init_per_suite,ok}},
{?eh,test_stats,{1,1,{1,0}}},
Expand All @@ -186,7 +186,7 @@ test_events(ac_spec) ->
{?eh,start_info,{1,1,3}},
{?eh,tc_start,{ct_framework,error_in_suite}},
{?eh,tc_done,{ct_framework,error_in_suite,
{failed,{error,'bad_SUITE can not be compiled or loaded'}}}},
{failed,{error,'bad_SUITE cannot be compiled or loaded'}}}},
{?eh,tc_start,{dummy_SUITE,init_per_suite}},
{?eh,tc_done,{dummy_SUITE,init_per_suite,ok}},
{?eh,test_stats,{1,1,{1,0}}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ hello_required_exists(Config) ->
SshDir = ?config(ssh_dir,Config),
{ok,_Client1} = open_configured_success(my_named_connection,SshDir),

%% Check that same name can not be used twice
%% Check that same name cannot be used twice
{error,{connection_exists,_Client1}} =
ct_netconfc:open(my_named_connection,[{user_dir,SshDir}]),

Expand Down Expand Up @@ -385,7 +385,7 @@ timeout_get(Config) ->
%% received, the timeout message might already be sent when the timer
%% is cancelled. This test checks that the timeout message is flushed
%% from the message queue. If it isn't, the client crashes and the
%% session can not be closed afterwards.
%% session cannot be closed afterwards.
%% Note that we can only hope that the test case triggers the problem
%% every now and then, as it is very timing dependent...
flush_timeout_get(Config) ->
Expand Down
4 changes: 2 additions & 2 deletions lib/common_test/test/test_server_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ translate_filename(Filename,EncodingOnTestNode) ->
end.

get_latest_run_dir(Dir) ->
%% For the time being, filelib:wildcard can not take a binary
%% For the time being, filelib:wildcard cannot take a binary
%% argument, so we avoid using this here.
case file:list_dir(Dir) of
{ok,Files} ->
Expand Down Expand Up @@ -315,7 +315,7 @@ generate_and_run_unicode_test(Config0,Encoding) ->
DataDir = ?config(data_dir,Config0),
Suite = create_unicode_test_suite(DataDir,Encoding),

%% We can not run this test on default node since it must be
%% We cannot run this test on default node since it must be
%% started with correct file name mode (+fnu/+fnl).
%% OBS: the node are stopped by end_per_testcase/2
Config1 = lists:keydelete(node,1,Config0),
Expand Down
Loading